Update ha_setup.sh

This commit is contained in:
tteckster 2022-02-09 01:44:40 -05:00 committed by GitHub
parent 8df67dfaaa
commit d36ecb90e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -92,11 +92,17 @@ docker run -d \
-v /etc/timezone:/etc/timezone:ro\ -v /etc/timezone:/etc/timezone:ro\
--net=host \ --net=host \
homeassistant/home-assistant:stable &>/dev/null homeassistant/home-assistant:stable &>/dev/null
echo -e "${CHECKMARK} \e[1;92m Creating Update Script... \e[0m"
file_path="/root/update.sh" file_path="/root/update.sh"
echo "#!/bin/bash echo "#!/bin/bash
echo -e '\e[1;33m Pulling New Stable Version... \e[0m'
docker pull homeassistant/home-assistant:stable docker pull homeassistant/home-assistant:stable
echo -e '\e[1;33m Stopping Home Assistant... \e[0m'
docker stop homeassistant docker stop homeassistant
echo -e '\e[1;33m Removing Home Assistant... \e[0m'
docker rm homeassistant docker rm homeassistant
echo -e '\e[1;33m Starting Home Assistant... \e[0m'
docker run -d \ docker run -d \
--name homeassistant \ --name homeassistant \
--privileged \ --privileged \
@ -108,7 +114,9 @@ docker run -d \
-v /etc/timezone:/etc/timezone:ro\ -v /etc/timezone:/etc/timezone:ro\
--net=host \ --net=host \
homeassistant/home-assistant:stable homeassistant/home-assistant:stable
docker image prune -f" > $file_path echo -e '\e[1;33m Removing Old Image... \e[0m'
docker image prune -f
echo -e '\e[1;33m Finished Update! \e[0m'" > $file_path
sudo chmod +x /root/update.sh sudo chmod +x /root/update.sh
echo -e "${CHECKMARK} \e[1;92m Customizing LXC... \e[0m" echo -e "${CHECKMARK} \e[1;92m Customizing LXC... \e[0m"