mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-21 03:56:28 +00:00
Avoid CLI restart on shutdown (#2507)
* Avoid CLI restart on shutdown * Update buildroot-external/rootfs-overlay/usr/sbin/hassos-cli
This commit is contained in:
parent
27992e2b13
commit
bf76a0b473
@ -19,7 +19,19 @@ docker container exec \
|
||||
-ti hassio_cli \
|
||||
/usr/bin/cli.sh
|
||||
|
||||
# Jump to root login shell
|
||||
if [ $? -eq 10 ]; then
|
||||
case $? in
|
||||
10)
|
||||
# Jump to root login shell (login command)
|
||||
exec /bin/ash -l
|
||||
fi
|
||||
;;
|
||||
143)
|
||||
# 143 graceful termination (SIGTERM). Most likely a proper shutdown.
|
||||
# Just sleep for a while until actual systemd shutdown gets invoked.
|
||||
echo ""
|
||||
echo "Home Assistant CLI has been terminated."
|
||||
sleep 30
|
||||
;;
|
||||
*)
|
||||
echo "HA CLI failed with error code: $?"
|
||||
;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user