=== modified file 'Makefile' --- Makefile 2013-10-27 00:45:08 +0000 +++ Makefile 2013-10-27 00:59:22 +0000 @@ -47,6 +47,8 @@ STATEDIR=$(DESTDIR)/var/lib/mandos ## +SYSTEMD=$(DESTDIR)$(shell pkg-config systemd --variable=systemdsystemunitdir) + GNUTLS_CFLAGS=$(shell pkg-config --cflags-only-I gnutls) GNUTLS_LIBS=$(shell pkg-config --libs gnutls) AVAHI_CFLAGS=$(shell pkg-config --cflags-only-I avahi-core) @@ -307,6 +309,9 @@ $(DESTDIR)/etc/dbus-1/system.d/mandos.conf install --mode=u=rwx,go=rx init.d-mandos \ $(DESTDIR)/etc/init.d/mandos + if [ "$(SYSTEMD)" != "$(DESTDIR)" -a -d "$(SYSTEMD)" ]; then \ + install --mode=u=rw,go=r mandos.service $(SYSTEMD) \ + fi install --mode=u=rw,go=r default-mandos \ $(DESTDIR)/etc/default/mandos if [ -z $(DESTDIR) ]; then \ @@ -436,6 +441,7 @@ $(DESTDIR)/etc/dbus-1/system.d/mandos.conf $(DESTDIR)/etc/default/mandos \ $(DESTDIR)/etc/init.d/mandos \ + $(SYSTEMD)/mandos.service \ $(DESTDIR)/run/mandos.pid \ $(DESTDIR)/var/run/mandos.pid -rmdir $(CONFDIR) === modified file 'debian/control' --- debian/control 2013-10-24 20:21:45 +0000 +++ debian/control 2013-10-27 00:59:22 +0000 @@ -6,7 +6,7 @@ Björn Påhlsson Build-Depends: debhelper (>= 9), docbook-xml, docbook-xsl, libavahi-core-dev, libgpgme11-dev, libgnutls-dev, xsltproc, - pkg-config + pkg-config, systemd Standards-Version: 3.9.4 Vcs-Bzr: http://ftp.recompile.se/pub/mandos/trunk Vcs-Browser: http://bzr.recompile.se/loggerhead/mandos/trunk/files === modified file 'init.d-mandos' --- init.d-mandos 2013-10-26 19:05:21 +0000 +++ init.d-mandos 2013-10-27 00:59:22 +0000 @@ -6,7 +6,7 @@ # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Mandos server -# Description: Gives encrypted passwords to Mandos clients +# Description: Server of encrypted passwords to Mandos clients ### END INIT INFO # Author: Teddy Hogeborn === added file 'mandos.service' --- mandos.service 1970-01-01 00:00:00 +0000 +++ mandos.service 2013-10-27 00:59:22 +0000 @@ -0,0 +1,20 @@ +[Unit] +Description=Server of encrypted passwords to Mandos clients + +[Service] +Type=simple +## Type=dbus is not appropriate, because Mandos also needs to announce +## its ZeroConf service and be reachable on the network. +#Type=dbus +#BusName=se.recompile.Mandos +ExecStart=/usr/sbin/mandos --foreground +Restart=always +KillMode=process +## Using socket activation won't work either, because systemd always +## does bind() on the socket, and also won't announce the ZeroConf +## service. +#ExecStart=/usr/sbin/mandos --foreground --socket=0 +#StandardInput=socket + +[Install] +WantedBy=multi-user.target