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
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
omr-vps-admin (0.3+20210508) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fix update VPS
|
||||||
|
|
||||||
|
-- OpenMPTCProuter <contact@openmptcprouter.com> Sat, 08 May 2021 08:40:13 +0200
|
||||||
|
|
||||||
omr-vps-admin (0.3+20210414) unstable; urgency=medium
|
omr-vps-admin (0.3+20210414) unstable; urgency=medium
|
||||||
|
|
||||||
* Add check MPTCP support
|
* Add check MPTCP support
|
||||||
|
|
|
@ -2320,10 +2320,10 @@ def update(current_user: User = Depends(get_current_user)):
|
||||||
if current_user.permissions == "ro":
|
if current_user.permissions == "ro":
|
||||||
return {'result': 'permission', 'reason': 'Read only user', 'route': 'update'}
|
return {'result': 'permission', 'reason': 'Read only user', 'route': 'update'}
|
||||||
LOG.debug("Update VPS...")
|
LOG.debug("Update VPS...")
|
||||||
|
with open("/etc/openmptcprouter-vps-admin/update", mode='a'): pass
|
||||||
os.system("systemctl stop omr")
|
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")
|
LOG.debug("Update VPS... done")
|
||||||
os.system("/sbin/reboot")
|
|
||||||
return {'result': 'done', 'route': 'update'}
|
return {'result': 'done', 'route': 'update'}
|
||||||
|
|
||||||
# Backup
|
# Backup
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue