Add systemd unit file for nscd
authorAllan McRae <allan@archlinux.org>
Mon, 16 Dec 2013 01:21:08 +0000 (11:21 +1000)
committerAllan McRae <allan@archlinux.org>
Mon, 16 Dec 2013 01:22:01 +0000 (11:22 +1000)
Provide an example systemd unit and tmpfile for running nscd.

ChangeLog
nscd/nscd.service [new file with mode: 0644]
nscd/nscd.tmpfiles [new file with mode: 0644]

index 811f4c9f319d16a1365698216e2639ca42eb61f6..ab32433a7190f00af94f0789ff94e45408acd339 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-16  Allan McRae  <allan@archlinux.org>
+
+       * nscd/nscd.service: New file.
+       * nscd/nscd.tmpfiles: New file.
+
 2013-12-14  Ondřej Bílka  <neleai@seznam.cz>
 
        [BZ #12100]
diff --git a/nscd/nscd.service b/nscd/nscd.service
new file mode 100644 (file)
index 0000000..99c7563
--- /dev/null
@@ -0,0 +1,18 @@
+# systemd service file for nscd
+
+[Unit]
+Description=Name Service Cache Daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/nscd --foreground
+ExecStop=/usr/sbin/nscd --shutdown
+ExecReload=/usr/sbin/nscd -i passwd
+ExecReload=/usr/sbin/nscd -i group
+ExecReload=/usr/sbin/nscd -i hosts
+ExecReload=/usr/sbin/nscd -i services
+Restart=always
+PIDFile=/run/nscd/nscd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/nscd/nscd.tmpfiles b/nscd/nscd.tmpfiles
new file mode 100644 (file)
index 0000000..52edbba
--- /dev/null
@@ -0,0 +1,4 @@
+# Configuration to create /run/nscd directory
+# Used as part of systemd's tmpfiles
+
+d /run/nscd 0755 root root