]> arthur.barton.de Git - netatalk.git/blobdiff - distrib/initscripts/Makefile.am
NEW: configure option "--with-init-style=debian-systemd" for Debian 8 jessieand later
[netatalk.git] / distrib / initscripts / Makefile.am
index 79dcfb3f283179abfcfb342ff095881577113c18..bcf1779c1a3fc95bc3c5400d1868d2bb9238cb80 100644 (file)
@@ -92,6 +92,28 @@ uninstall-startup:
 
 endif
 
+#
+# checking for "Debian" style systemd scripts:
+#
+
+if USE_DEBIAN_SYSTEMD
+
+servicedir     = $(INIT_DIR)
+service_DATA   = netatalk.service
+
+netatalk.service: service.systemd
+       cp -f service.systemd netatalk.service
+
+install-data-hook:
+       -systemctl daemon-reload
+
+uninstall-startup:
+       -systemctl disable $(service_DATA)
+       rm -f $(DESTDIR)$(servicedir)/netatalk.service
+       -systemctl daemon-reload
+
+endif
+
 #
 # checking for "SuSE" style sysv scripts:
 #
@@ -178,7 +200,7 @@ endif
 # checking for "Debian" style sysv scripts:
 #
 
-if USE_DEBIAN
+if USE_DEBIAN_SYSV
 
 sysvdir = $(INIT_DIR)
 sysv_SCRIPTS = netatalk