From 027d5c8e80ef469d33e43f6cbf3103b30e55ea1c Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sat, 8 May 2021 08:41:02 +0200 Subject: [PATCH] Fix VPS update --- debian/changelog | 6 ++++++ omr-admin.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a5bafc5..f9678a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +omr-vps-admin (0.3+20210508) unstable; urgency=medium + + * Fix update VPS + + -- OpenMPTCProuter Sat, 08 May 2021 08:40:13 +0200 + omr-vps-admin (0.3+20210414) unstable; urgency=medium * Add check MPTCP support diff --git a/omr-admin.py b/omr-admin.py index 3738e30..567d998 100755 --- a/omr-admin.py +++ b/omr-admin.py @@ -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