Skip to content

Commit c672497

Browse files
committed
Fix for sysmaint systems (Whonix & Kicksecure)
fixes: QubesOS/qubes-issues#9974
1 parent 03d7948 commit c672497

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qubesidle/idleness_monitor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ def main():
115115

116116
asyncio.get_event_loop().run_until_complete(monitor.monitor_idleness())
117117

118-
subprocess.call(['sudo', 'poweroff'])
118+
try:
119+
subprocess.run(['systemctl', 'poweroff'], check=True)
120+
except subprocess.CalledProcessError:
121+
subprocess.run(['sudo', 'poweroff'])
119122

120123

121124
if __name__ == '__main__':

0 commit comments

Comments
 (0)