From ded7b69826ed0210509ae972116dbf476f934c53 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 16 Feb 2022 07:12:24 -0500 Subject: [PATCH] Update ha_setup.sh --- setup/ha_setup.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/setup/ha_setup.sh b/setup/ha_setup.sh index 66d515e6..76c1d3d9 100644 --- a/setup/ha_setup.sh +++ b/setup/ha_setup.sh @@ -115,6 +115,8 @@ show_menu(){ printf "${menu}**${number} 2)${number} Switch to Beta Branch ${normal}\n" printf "${menu}**${number} 3)${fgred} Switch to Dev Branch ${normal}\n" printf "${menu}**${number} 4)${safe} Just Update Containers ${normal}\n" + printf "${menu}**${number} 5)${safe} Remove Unused Images ${normal}\n" + printf "${menu}**${number} 6)${safe} Update Host OS ${normal}\n" printf "${menu}*********************************************${normal}\n" printf "Please choose an option from the menu and enter or ${fgred}x to exit. ${normal}" read opt @@ -155,6 +157,17 @@ while [ $opt != '' ] ./update-containers.sh; exit; ;; + 5) clear; + option_picked "Removing Unused Images"; + docker image prune -af; + exit; + ;; + 6) clear; + option_picked "Updating Host OS"; + apt update && apt upgrade -y; + exit; + ;; + x)exit; ;; \n)exit; @@ -170,16 +183,13 @@ docker pull homeassistant/home-assistant:$TAG docker rm --force homeassistant 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:$TAG - docker image prune -af EOF sudo chmod +x /root/update cat >$UPDATE_CONTAINERS_PATH <<'EOF' @@ -198,7 +208,6 @@ for container in ${CONTAINER_LIST}; do eval ${DOCKER_COMMAND} fi done -docker image prune -af EOF sudo chmod +x /root/update-containers.sh