summarylogtreecommitdiffstats
path: root/answer.service
blob: 71cd91d232df2f32c5414e73636d375731461415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
Description=running answer daemon
Requires=network-online.target
After=network-online.target

[Service]
Type=simple
# 'setcap CAP_NET_BIND_SERVICE=+ep' is to allow non-root user binding port within 1-1024
ExecStart=bash -c 'setcap CAP_NET_BIND_SERVICE=+ep /usr/bin/answer; if [[ -d "/var/lib/answer/data/i18n/" ]]; then sudo -u answer /usr/bin/answer run; else sudo -u answer /usr/bin/answer init ;fi'
ExecStop=

[Install]
WantedBy=multi-user.target