mirror of
https://github.com/nwg-piotr/nwg-shell.git
synced 2024-10-27 01:01:39 +03:00
force reboot if systemctl available
This commit is contained in:
parent
2bfcf8ac6e
commit
2698e4564e
@ -306,6 +306,9 @@ def main():
|
||||
else:
|
||||
print("Your computer will now restart...")
|
||||
time.sleep(3)
|
||||
if is_command("systemctl"):
|
||||
subprocess.call("sudo systemctl reboot -f", shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
||||
else:
|
||||
subprocess.call("sudo reboot", shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user