Files
operating-system/buildroot-external/rootfs-overlay/usr/sbin/hassos-cli
Pascal Vizeli ee13d1fb45 Add emergency Console (#705)
* Add emergency Console

* fix lint
2020-06-02 23:28:13 +02:00

22 lines
530 B
Bash
Executable File

#!/bin/sh
# ==============================================================================
# Run logging cli
# ==============================================================================
# Run CLI container
if [ "$(docker ps -q -f name=hassio_cli)" ]; then
docker container exec \
-ti hassio_cli \
/usr/bin/cli.sh \
# Jump to root login shell
if [ $? -eq 10 ]; then
/bin/ash -l
fi
else
echo "[ERROR] Somethings going wrong! Jump into emergency console..."
/bin/ash -l
fi
exit