aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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