mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-03 15:56:17 +00:00
Commit June 2
This commit is contained in:
14
src/wgd.sh
14
src/wgd.sh
@@ -50,17 +50,21 @@ update_wgd() {
|
||||
printf "Are you sure you want to update to the %s? (Y/N): " "$new_ver"
|
||||
read up
|
||||
if [ "$up" = "Y" ]; then
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Shutting down Wireguard Dashboard... |\n"
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Downloading %s from GitHub... |\n" "$new_ver"
|
||||
printf "%s\n" "$dashes"
|
||||
git pull https://github.com/donaldzou/wireguard-dashboard.git $new_ver --force > /dev/null 2>&1
|
||||
printf "| Installing all required python package |\n"
|
||||
python3 -m pip install -r requirements.txt
|
||||
printf "| Update Successfully! |\n"
|
||||
printf "| Dashboard is running... |\n"
|
||||
exec "wgd.sh" "start"
|
||||
printf "%s\n" "$dashes"
|
||||
printf "| Now you can start the dashboard with >> sh wgd.sh start |\n"
|
||||
printf "%s\n" "$dashes"
|
||||
exit 1
|
||||
else
|
||||
printf "Cancel update. \n"
|
||||
printf "%s\n" "$dashes"
|
||||
printf "CANCEL update. \n"
|
||||
printf "%s\n" "$dashes"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user