From 501c479c997dc429d30af591026014f5e32bbcb5 Mon Sep 17 00:00:00 2001 From: Luke Hoggatt <37279082+hoggatt@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:20:39 -0500 Subject: [PATCH] Allow Updating WGDashboard If selecting WGDashboard and the app is already installed, run the update functionality provided by the WGDashboard project: https://github.com/donaldzou/WGDashboard?tab=readme-ov-file#update-method-1-for-v30-or-above I've tested this and it works on my Wireguard LXC. --- ct/wireguard.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index c8cc7c6f..1fb935f1 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -68,7 +68,11 @@ exit fi if [ "$UPD" == "2" ]; then if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then - msg_error "Existing WGDashboard Installation Found!"; + msg_info "Updating WGDashboard" + cd /etc/wgdashboard/src + yes "Y" | sudo ./wgd.sh update &>/dev/null + sudo chmod u+x wgd.sh + msg_ok "Updated Successfully" exit fi IP=$(hostname -I | awk '{print $1}')