mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-04 08:16: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
|
from tinydb import TinyDB, Query
|
||||||
|
|
||||||
# Dashboard Version
|
# Dashboard Version
|
||||||
dashboard_version = 'v2.0.1'
|
dashboard_version = 'v2.0'
|
||||||
# Dashboard Config Name
|
# Dashboard Config Name
|
||||||
dashboard_conf = 'wg-dashboard.ini'
|
dashboard_conf = 'wg-dashboard.ini'
|
||||||
# Upgrade Required
|
# Upgrade Required
|
||||||
@@ -633,7 +633,10 @@ def check_update():
|
|||||||
conf.read(dashboard_conf)
|
conf.read(dashboard_conf)
|
||||||
data = urllib.request.urlopen("https://api.github.com/repos/donaldzou/wireguard-dashboard/releases").read()
|
data = urllib.request.urlopen("https://api.github.com/repos/donaldzou/wireguard-dashboard/releases").read()
|
||||||
output = json.loads(data)
|
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"
|
return "false"
|
||||||
else:
|
else:
|
||||||
return "true"
|
return "true"
|
||||||
|
@@ -56,7 +56,8 @@ update_wgd() {
|
|||||||
printf "| Installing all required python package |\n"
|
printf "| Installing all required python package |\n"
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
printf "| Update Successfully! |\n"
|
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
|
exit 1
|
||||||
else
|
else
|
||||||
printf "Cancel update. \n"
|
printf "Cancel update. \n"
|
||||||
|
Reference in New Issue
Block a user