mirror of
https://github.com/nwg-piotr/nwg-shell.git
synced 2024-10-26 16:52:53 +03:00
force reboot if systemctl available
This commit is contained in:
parent
2bfcf8ac6e
commit
2698e4564e
@ -306,7 +306,10 @@ def main():
|
||||
else:
|
||||
print("Your computer will now restart...")
|
||||
time.sleep(3)
|
||||
subprocess.call("sudo reboot", shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
||||
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)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user