summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2014-01-05 12:24:32 -0800
committerRuss Allbery <rra@stanford.edu>2014-01-05 13:00:11 -0800
commita00d1d4ff597ab0d1ab3020ecce9a3b0aae67514 (patch)
treeaff1434d22b76c5eccde1ef270b2557780eb2834 /systemd
parenta5a819c8951ee9da5fec5560f266a88d3b2fd551 (diff)
Add support for systemd socket activation and notification
Add support for systemd. If built on a system with systemd installed, remctl will install (but not enable) systemd units to start remctld via socket activation. remctld will also notify systemd when its initialization is complete if started by systemd with service notification enabled. Change-Id: I91caa7a3a909c7e85454e43b4cf3b6d7bd4a6067 Reviewed-on: https://gerrit.stanford.edu/1356 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'systemd')
-rw-r--r--systemd/remctld.service.in17
-rw-r--r--systemd/remctld.socket12
2 files changed, 29 insertions, 0 deletions
diff --git a/systemd/remctld.service.in b/systemd/remctld.service.in
new file mode 100644
index 0000000..abb7208
--- /dev/null
+++ b/systemd/remctld.service.in
@@ -0,0 +1,17 @@
+# systemd configuration for remctld. -*- conf -*-
+
+[Unit]
+Description=remote authenticated command execution with ACLs
+Documentation=man:remctld(8)
+Documentation=http://www.eyrie.org/~eagle/software/remctld/
+Requires=remctld.socket
+
+[Service]
+Type=simple
+NotifyAccess=main
+Restart=always
+ExecStart=@sbindir@/remctld -F -m
+
+[Install]
+Also=remctld.socket
+WantedBy=multi-user.target
diff --git a/systemd/remctld.socket b/systemd/remctld.socket
new file mode 100644
index 0000000..b134add
--- /dev/null
+++ b/systemd/remctld.socket
@@ -0,0 +1,12 @@
+# Socket configuration for remctld service. -*- conf -*-
+
+[Unit]
+Description=remctld listening socket
+Documentation=man:remctld(8)
+Documentation=http://www.eyrie.org/~eagle/software/remctl/
+
+[Socket]
+ListenStream=4373
+
+[Install]
+WantedBy=sockets.target