diff --git a/src/wg-dashboard.service b/src/wg-dashboard.service index 9a596df..44b5c43 100644 --- a/src/wg-dashboard.service +++ b/src/wg-dashboard.service @@ -1,11 +1,14 @@ [Unit] -After=netword.service +After=syslog.target network-online.target +ConditionPathIsDirectory=/etc/wireguard [Service] -WorkingDirectory= -ExecStart=/usr/bin/python3 dashboard.py +Environment="VIRTUAL_ENV={{VIRTUAL_ENV}}" +WorkingDirectory={{APP_ROOT}} +ExecStart={{VIRTUAL_ENV}}/bin/python3 {{APP_ROOT}}dashboard.py +PrivateTmp=yes Restart=always [Install] -WantedBy=default.target \ No newline at end of file +WantedBy=multi-user.target