systemd service files for server/slave
authorClinton Ebadi <clinton@unknownlamer.org>
Sat, 18 Apr 2015 22:25:37 +0000 (18:25 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sun, 3 May 2015 18:45:21 +0000 (14:45 -0400)
Welcome to the future, whether we like or not.

Service files should provide functionality similar to the current init
scripts. Current no service monitoring is implemented (if possible,
regularly `domtool-admin ping'ing service and restarting if no response
would be nice).

/var/log/domtool.log is gone, replaced by use of the system journal.

scripts/domtool-server.service [new file with mode: 0644]
scripts/domtool-slave.service [new file with mode: 0644]

diff --git a/scripts/domtool-server.service b/scripts/domtool-server.service
new file mode 100644 (file)
index 0000000..7f37b0b
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Domtool Dispatcher
+After=network.target remote-fs.target time-sync.target openafs-client.service nss-lookup.target
+Requires=network.target remote-fs.target time-sync.target openafs-client.service nss-lookup.target
+
+[Service]
+User=domtool
+Group=nogroup
+ExecStart=/usr/bin/k5start -qtUf /etc/keytabs/domtool -K 300 /usr/local/sbin/domtool-server
+ExecStop=/usr/bin/k5start -qtUf /etc/keytabs/domtool /usr/local/bin/domtool-admin shutdown
+SyslogIdentifier=domtool-server
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/scripts/domtool-slave.service b/scripts/domtool-slave.service
new file mode 100644 (file)
index 0000000..8e1f853
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Domtool Worker
+After=network.target remote-fs.target time-sync.target openafs-client.service nss-lookup.target
+Requires=network.target remote-fs.target time-sync.target openafs-client.service nss-lookup.target 
+
+[Service]
+User=domtool
+Group=nogroup
+ExecStart=/usr/bin/k5start -qtUf /etc/keytabs/domtool -K 300 /usr/local/sbin/domtool-slave
+ExecStop=/usr/bin/k5start -qtUf /etc/keytabs/domtool /usr/local/bin/domtool-admin slave-shutdown
+SyslogIdentifier=domtool-slave
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file