Skip to content

Commit 933ed3e

Browse files
committed
Fix for sysmaint systems (Whonix & Kicksecure)
fixes: QubesOS/qubes-issues#9974
1 parent 52fbea4 commit 933ed3e

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
@@ -118,7 +118,10 @@ def main():
118118

119119
asyncio.run(monitor.monitor_idleness())
120120

121-
subprocess.call(['sudo', 'poweroff'])
121+
try:
122+
subprocess.run(['systemctl', 'poweroff'], check=True)
123+
except subprocess.CalledProcessError:
124+
subprocess.run(['sudo', 'poweroff'])
122125

123126

124127
if __name__ == '__main__':

0 commit comments

Comments
 (0)