mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
No shutdown delay after sleeping.
This commit is contained in:
parent
4cc00a9cb1
commit
434d432e8a
1 changed files with 2 additions and 1 deletions
|
|
@ -159,7 +159,8 @@ async def shutdown(reboot: bool = False, delay: int = 10):
|
|||
await asyncio.sleep(delay)
|
||||
|
||||
try:
|
||||
cmd = f'{SUDO_BIN} shutdown {reboot}'
|
||||
# Call shutdown (or reboot) with no delay now that we have slept.
|
||||
cmd = f'{SUDO_BIN} shutdown {reboot} 0'
|
||||
proc = await asyncio.create_subprocess_shell(cmd, stderr=asyncio.subprocess.PIPE,
|
||||
stdout=asyncio.subprocess.PIPE)
|
||||
stdout, stderr = await proc.communicate()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue