mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-03-09 15:40:05 +00:00
Fix VPS update
This commit is contained in:
parent
b40c6b615e
commit
027d5c8e80
2 changed files with 8 additions and 2 deletions
|
@ -2320,10 +2320,10 @@ def update(current_user: User = Depends(get_current_user)):
|
|||
if current_user.permissions == "ro":
|
||||
return {'result': 'permission', 'reason': 'Read only user', 'route': 'update'}
|
||||
LOG.debug("Update VPS...")
|
||||
with open("/etc/openmptcprouter-vps-admin/update", mode='a'): pass
|
||||
os.system("systemctl stop omr")
|
||||
os.system("wget -O - http://www.openmptcprouter.com/server/debian10-x86_64.sh | sh &")
|
||||
os.system("systemctl -q restart omr-update")
|
||||
LOG.debug("Update VPS... done")
|
||||
os.system("/sbin/reboot")
|
||||
return {'result': 'done', 'route': 'update'}
|
||||
|
||||
# Backup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue