mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-12-04 23:45:16 +00:00
21 lines
555 B
SYSTEMD
21 lines
555 B
SYSTEMD
|
[Unit]
|
||
|
Description=yggdrasil
|
||
|
Wants=network.target
|
||
|
After=network.target
|
||
|
|
||
|
[Service]
|
||
|
ProtectHome=true
|
||
|
ProtectSystem=true
|
||
|
SyslogIdentifier=yggdrasil
|
||
|
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=/bin/sh -c "exec yggdrasil -useconf < /etc/yggdrasil.conf"
|
||
|
Restart=always
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|
||
|
Also=yggdrasil-resume.service
|