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.
This commit is contained in:
Martin 2021-09-21 18:24:49 +02:00 committed by Omar Polo
parent 36d2d7b4b3
commit 2b38d395cd
1 changed files with 13 additions and 6 deletions

View File

@ -1,14 +1,21 @@
[Unit] [Unit]
Description=The gmid Gemini server 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 Wants=network-online.target
[Service] [Service]
Type=forking Type=simple
ExecStart=/usr/local/bin/gmid -c /etc/gmid.conf User=gmid
# to start the daemon as a dedicated user: Group=nobody
#User=_gmid ExecStart=/usr/local/bin/gmid -f -c /etc/gmid.conf
#Group=_gmid ExecStop=/bin/kill -TERM $MAINPID
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=30
StandardOutput=journal
StandardError=inherit
SyslogIdentifier=gmid
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target