This commit is contained in:
Fredrik Eriksson 2024-06-16 14:28:54 +02:00
parent 6305fd053b
commit 0e577bebc5
Signed by: feffe
GPG Key ID: E6B5580B853D322B

View File

@ -46,7 +46,7 @@ def init():
def fork_and_reboot():
log = logging.getLogger(sau.LOGNAME)
if os.path.exist('/proc/1/comm'):
if os.path.exists('/proc/1/comm'):
with open('/proc/1/comm', 'r') as f:
if f.readline().strip() == 'systemd':
os.execl('/usr/bin/systemctl', 'reboot')