You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
663 B
INI

[Unit]
Description=WireGuard Access Server Service - $APP_REPO
ConditionPathExists=$APP_HOME/target/release/wgas
After=network.target
[Service]
Type=simple
User=$APP_USER
Group=$APP_USER
LimitNOFILE=1024
Restart=on-failure
RestartSec=10
startLimitIntervalSec=60
WorkingDirectory=$APP_HOME
ExecStart=$APP_HOME/target/release/wgas
# make sure log directory exists and owned by syslog
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /var/log/$APP_SVC
ExecStartPre=/bin/chown syslog:adm /var/log/$APP_SVC
ExecStartPre=/bin/chmod 755 /var/log/$APP_SVC
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=$APP_SVC
[Install]
WantedBy=multi-user.target