correction de path de l'utilitaire systeme systemctl
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user