[Pkg-mpd-commits] [pkg-mpd] 07/08: Install mpd.service as a user unit (closes: #835502)

Florian Schlichting fsfs at moszumanska.debian.org
Mon Sep 12 20:04:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

fsfs pushed a commit to branch master
in repository pkg-mpd.

commit 7c01a42bb873a52aa92b81f48d45aefc05859ec3
Author: Florian Schlichting <fsfs at debian.org>
Date:   Mon Sep 12 21:18:52 2016 +0200

    Install mpd.service as a user unit (closes: #835502)
---
 debian/mpd.service.user | 13 +++++++++++++
 debian/rules            |  5 +++++
 2 files changed, 18 insertions(+)

diff --git a/debian/mpd.service.user b/debian/mpd.service.user
new file mode 100644
index 0000000..f75956a
--- /dev/null
+++ b/debian/mpd.service.user
@@ -0,0 +1,13 @@
+[Unit]
+Description=Music Player Daemon (user unit)
+Documentation=man:mpd(1) man:mpd.conf(5)
+Documentation=file:///usr/share/doc/mpd/user-manual.html
+
+[Service]
+ExecStart=/usr/bin/mpd --no-daemon
+
+# disallow writing to /usr, /bin, /sbin, ...
+ProtectSystem=yes
+
+[Install]
+WantedBy=default.target
diff --git a/debian/rules b/debian/rules
index 25a9596..facd3ca 100755
--- a/debian/rules
+++ b/debian/rules
@@ -142,6 +142,11 @@ override_dh_auto_build:
 	/usr/bin/xmlto --stringparam chunker.output.encoding=utf-8 html-nochunks $(CURDIR)/doc/user.xml
 	mv user.html user-manual.html
 
+override_dh_auto_install:
+	dh_auto_install
+	test -f $(CURDIR)/debian/mpd/lib/systemd/system/mpd.service && \
+	    install -Dm644 $(CURDIR)/debian/mpd.service.user $(CURDIR)/debian/mpd/usr/lib/systemd/user/mpd.service
+
 override_dh_strip:
 	# can be dropped after Stretch
 	dh_strip  --ddeb-migration='mpd-dbg (<< 0.19.14-1~)'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/pkg-mpd.git



More information about the Pkg-mpd-commits mailing list