aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMartin <devel@datenbrei.de>2021-09-21 18:24:49 +0200
committerOmar Polo <op@omarpolo.com>2021-09-21 19:15:50 +0200
commit2b38d395cdf3a5b9a91d0495fc322181341d5862 (patch)
tree5440fc3e500f5ab9dcf1886b23aab4e844b6238c /contrib
parent36d2d7b4b39d91868b97c86e6242f19edf6e4103 (diff)
Improve gmid.service
Changed gmid.service to not to fork the server and forced to run under user "gmid". gmid now waits for the network stack beeing available before starting. Also "gmid" is now the syslog id.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gmid.service19
1 files changed, 13 insertions, 6 deletions
diff --git a/contrib/gmid.service b/contrib/gmid.service
index 3aedb92..3090f38 100644
--- a/contrib/gmid.service
+++ b/contrib/gmid.service
@@ -1,14 +1,21 @@
[Unit]
Description=The gmid Gemini server
-After=syslog.target network.target
+Documentation=https://gmid.omarpolo.com/
+After=network-online.target syslog.target
Wants=network-online.target
[Service]
-Type=forking
-ExecStart=/usr/local/bin/gmid -c /etc/gmid.conf
-# to start the daemon as a dedicated user:
-#User=_gmid
-#Group=_gmid
+Type=simple
+User=gmid
+Group=nobody
+ExecStart=/usr/local/bin/gmid -f -c /etc/gmid.conf
+ExecStop=/bin/kill -TERM $MAINPID
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-failure
+RestartSec=30
+StandardOutput=journal
+StandardError=inherit
+SyslogIdentifier=gmid
[Install]
WantedBy=multi-user.target