From 55f55820c5d40b4b86f2525e21501bf1cdaddf25 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sun, 11 Aug 2024 11:02:08 -0400 Subject: [PATCH] Update wg-dashboard.service --- src/wg-dashboard.service | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/wg-dashboard.service b/src/wg-dashboard.service index 1722b3a..5b6c994 100644 --- a/src/wg-dashboard.service +++ b/src/wg-dashboard.service @@ -1,14 +1,18 @@ [Unit] After=syslog.target network-online.target +Wants=wg-quick.target ConditionPathIsDirectory=/etc/wireguard [Service] -Environment="VIRTUAL_ENV={{VIRTUAL_ENV}}" -WorkingDirectory={{APP_ROOT}} -ExecStart={{VIRTUAL_ENV}}/bin/python3 {{APP_ROOT}}/dashboard.py +Type=forking +PIDFile=/opt/wgdashboard/src/gunicorn.pid +WorkingDirectory=/opt/wgdashboard/src +ExecStart=/opt/wgdashboard/src/wgd.sh start +ExecStop=/opt/wgdashboard/src/wgd.sh stop +ExecReload=/opt/wgdashboard/src/wgd.sh restart +TimeoutSec=120 PrivateTmp=yes Restart=always - [Install] WantedBy=multi-user.target \ No newline at end of file