mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-03 15:56:17 +00:00
Compare commits
2 Commits
v2.0.1-bet
...
v2.0.1-bet
Author | SHA1 | Date | |
---|---|---|---|
|
0a92269456 | ||
|
1cb8906893 |
@@ -15,7 +15,7 @@ import ifcfg
|
||||
from tinydb import TinyDB, Query
|
||||
|
||||
# Dashboard Version
|
||||
dashboard_version = 'v2.0.1'
|
||||
dashboard_version = 'v2.0'
|
||||
# Dashboard Config Name
|
||||
dashboard_conf = 'wg-dashboard.ini'
|
||||
# Upgrade Required
|
||||
@@ -633,7 +633,10 @@ def check_update():
|
||||
conf.read(dashboard_conf)
|
||||
data = urllib.request.urlopen("https://api.github.com/repos/donaldzou/wireguard-dashboard/releases").read()
|
||||
output = json.loads(data)
|
||||
if conf.get("Server", "version") == output[0]["tag_name"]:
|
||||
release = []
|
||||
for i in output:
|
||||
if i["prerelease"] == False: release.append(i)
|
||||
if conf.get("Server", "version") == release[0]["tag_name"]:
|
||||
return "false"
|
||||
else:
|
||||
return "true"
|
||||
|
@@ -56,7 +56,8 @@ update_wgd() {
|
||||
printf "| Installing all required python package |\n"
|
||||
python3 -m pip install -r requirements.txt
|
||||
printf "| Update Successfully! |\n"
|
||||
printf "| Now you can start the dashboard with >> sh wgd.sh start |\n"
|
||||
printf "| Dashboard is running... |\n"
|
||||
exec "wgd.sh" "start"
|
||||
exit 1
|
||||
else
|
||||
printf "Cancel update. \n"
|
||||
|
Reference in New Issue
Block a user