From 45e1c7dc871676a9191a63ae23b42855db6118d5 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 19 Jan 2022 15:50:42 -0500 Subject: [PATCH] Add files via upload --- misc/update.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 misc/update.sh diff --git a/misc/update.sh b/misc/update.sh new file mode 100644 index 00000000..40b1d4e3 --- /dev/null +++ b/misc/update.sh @@ -0,0 +1,23 @@ +#!/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 \ + homeassistant/home-assistant:stable &>/dev/null +echo -e "\e[1;33m Removing Old Image... \e[0m" +docker image prune -f +echo -e "\e[1;33m Finished Update! \e[0m" \ No newline at end of file