diff --git a/clusterd/Makefile b/clusterd/Makefile index 0817b7ba..e130d3ae 100644 --- a/clusterd/Makefile +++ b/clusterd/Makefile @@ -5,9 +5,10 @@ DESTDIR= all: -install: clusterd +install: clusterd clusterd.service install -d ${DESTDIR}${SBINDIR} install -m 755 clusterd ${DESTDIR}${SBINDIR}/clusterd + install -m 644 clusterd.service ${DESTDIR}/etc/systemd/system/clusterd.service restart: install systemctl restart clusterd.service diff --git a/clusterd/clusterd.service b/clusterd/clusterd.service new file mode 100644 index 00000000..79f0beb0 --- /dev/null +++ b/clusterd/clusterd.service @@ -0,0 +1,14 @@ +[Unit] +Description=ClusterDonald +Requires=network.target +After=network.target + +[Service] +ExecStart=/usr/sbin/clusterd --daemon --foreground --kill --syslog +StandardOutput=syslog +Restart=always +RestartSec=10s + +[Install] +WantedBy=multi-user.target +