diff --git a/forking-daemon.service b/forking-daemon.service new file mode 100644 index 0000000..4b4318d --- /dev/null +++ b/forking-daemon.service @@ -0,0 +1,15 @@ +[Unit] +Description=Example of forking daemon program + +[Service] +Type=forking +PIDFile=/var/run/daemon.pid +ExecStart=/usr/bin/daemon \ + --conf_file /etc/daemon/daemon.conf \ + --log_file /var/log/daemon.log \ + --pid_file /var/run/daemon.pid \ + --daemon +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multiuser.agent diff --git a/simple-daemon.service b/simple-daemon.service new file mode 100644 index 0000000..a22a0c1 --- /dev/null +++ b/simple-daemon.service @@ -0,0 +1,13 @@ +[Unit] +Description=Example of simple daemon program + +[Service] +Type=simple +ExecStart=/usr/bin/daemon \ + --conf_file /etc/daemon/daemon.conf \ + --log_file /var/log/daemon.log +User=root +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multiuser.agent