Proxmox/misc/update.sh

24 lines
743 B
Bash
Raw Normal View History

2022-01-19 21:50:42 +01:00
#!/bin/bash
echo -e "\e[1;33m Pulling New Stable Version... \e[0m"
docker pull homeassistant/home-assistant:stable
echo -e "\e[1;33m Stopping Home Assistant... \e[0m"
docker stop homeassistant
echo -e "\e[1;33m Removing Home Assistant... \e[0m"
docker rm homeassistant
echo -e "\e[1;33m Starting Home Assistant... \e[0m"
docker run -d \
--name homeassistant \
--privileged \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /dev:/dev \
-v hass_config:/config \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro\
--net=host \
2022-01-19 22:06:32 +01:00
homeassistant/home-assistant:stable
2022-01-19 21:50:42 +01:00
echo -e "\e[1;33m Removing Old Image... \e[0m"
docker image prune -f
2022-01-19 22:06:32 +01:00
echo -e "\e[1;33m Finished Update! \e[0m"