correction de path de l'utilitaire systeme systemctl

This commit is contained in:
Vincent BENOIT
2022-12-23 16:51:22 +01:00
parent c2af4ff9e8
commit 7950968f24

View File

@@ -166,7 +166,7 @@ def reboot():
if os.path.exists(userpath):
shutil.rmtree(userpath)
reboot_cmd = ['sudo', '/usr/bin/systemctl', 'reboot']
reboot_cmd = ['sudo', '/bin/systemctl', 'reboot']
if not execute_cmd(reboot_cmd):
abort(status.HTTP_500_INTERNAL_SERVER_ERROR,
description='Redémarrage du système impossible')
@@ -186,7 +186,7 @@ def shutdown():
if os.path.exists(userpath):
shutil.rmtree(userpath)
reboot_cmd = ['sudo', '/usr/bin/systemctl', 'poweroff']
reboot_cmd = ['sudo', '/bin/systemctl', 'poweroff']
if not execute_cmd(reboot_cmd):
abort(status.HTTP_500_INTERNAL_SERVER_ERROR,
description='Arrêt du système impossible')