summarylogtreecommitdiffstats
path: root/gopherbook.service
blob: 34d4092c74cbcdd4ac0ba4a135253f1b6f139fd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
Description=Gopherbook Comic Library Server
After=network.target

[Service]
Type=simple
ExecStartPre=/bin/sh -c 'if [ -f "$HOME/.config/gopherbook/gopherbook.conf" ]; then echo "Using user config"; elif [ -f "/etc/gopherbook/gopherbook.conf" ]; then echo "Using system config"; fi'
ExecStart=/bin/sh -c 'if [ -f "$HOME/.config/gopherbook/gopherbook.conf" ]; then set -a; . "$HOME/.config/gopherbook/gopherbook.conf"; set +a; fi; if [ -f "/etc/gopherbook/gopherbook.conf" ] && [ ! -f "$HOME/.config/gopherbook/gopherbook.conf" ]; then set -a; . /etc/gopherbook/gopherbook.conf; set +a; fi; exec /usr/bin/gopherbook'
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target