Add systemd unit file Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/debian/changelog b/debian/changelog index 1a8a340..de79684 100644 --- a/debian/changelog +++ b/debian/changelog
@@ -7,6 +7,8 @@ * Fix various lintian warnings * Drop trailing whitespaces in changelog * Fix debian-rules-missing-recommended-target warning + * rbootd: Exit with return code 0 when terminated + * Add systemd unit file -- Helge Deller <deller@gmx.de> Thu, 24 Sep 2020 20:13:47 +0200
diff --git a/debian/dirs b/debian/dirs index f7b8422..6455c67 100644 --- a/debian/dirs +++ b/debian/dirs
@@ -3,3 +3,4 @@ etc/init.d usr/share/man/man8 usr/share/doc/rbootd +lib/systemd/system
diff --git a/debian/rules b/debian/rules index b187ff4..8137618 100755 --- a/debian/rules +++ b/debian/rules
@@ -59,6 +59,7 @@ install -o root -g root -m 0644 debian/default ${BASEDIR}/etc/default/rbootd install -o root -g root -m 0755 debian/rbootd.init.d ${BASEDIR}/etc/init.d/rbootd install -o root -g root -m 0644 etc-rbootd/rbootd.conf ${BASEDIR}/etc + install -o root -g root -m 0644 rbootd.service ${BASEDIR}/lib/systemd/system install -o root -g root -m 0644 rbootd.8 ${BASEDIR}/usr/share/man/man8 @if [ -f ${BASEDIR}/usr/share/man/man8/rbootd.8 ]; then \ gzip -9vn ${BASEDIR}/usr/share/man/man8/rbootd.8 ; \
diff --git a/rbootd.service b/rbootd.service new file mode 100644 index 0000000..fc48a54 --- /dev/null +++ b/rbootd.service
@@ -0,0 +1,14 @@ +[Unit] +Description=Remote Boot Daemon +Documentation=man:rbootd(8) +After=network.target + +[Service] +Type=forking +EnvironmentFile=/etc/default/rbootd +ExecStart=/usr/sbin/rbootd +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target +Alias=rbootd.service