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.
This commit is contained in:
Luke Hoggatt 2024-04-26 16:20:39 -05:00 committed by GitHub
parent ccc91c0337
commit 501c479c99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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}')