5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-24 20:41:37 +00:00
yggdrasil-go/contrib/systemd/yggdrasil.service

25 lines
668 B
SYSTEMD
Raw Normal View History

2018-01-28 11:59:22 +00:00
[Unit]
Description=yggdrasil
Wants=network.target
After=network.target
[Service]
Group=yggdrasil
2018-01-28 11:59:22 +00:00
ProtectHome=true
ProtectSystem=true
SyslogIdentifier=yggdrasil
2019-11-25 04:54:30 +00:00
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW
ExecStartPre=+-/sbin/modprobe tun
2018-01-28 11:59:22 +00:00
ExecStartPre=/bin/sh -ec "if ! test -s /etc/yggdrasil.conf; \
then umask 077; \
yggdrasil -genconf > /etc/yggdrasil.conf; \
echo 'WARNING: A new /etc/yggdrasil.conf file has been generated.'; \
fi"
ExecStart=/usr/bin/yggdrasil -useconffile /etc/yggdrasil.conf
2019-02-18 22:31:34 +00:00
ExecReload=/bin/kill -HUP $MAINPID
2018-01-28 11:59:22 +00:00
Restart=always
2019-09-27 08:37:34 +00:00
TimeoutStopSec=5
2018-01-28 11:59:22 +00:00
[Install]
WantedBy=multi-user.target