mirror of https://github.com/tteck/Proxmox.git
Update ha_setup.sh
This commit is contained in:
parent
6103a19cd3
commit
ded7b69826
|
@ -115,6 +115,8 @@ show_menu(){
|
||||||
printf "${menu}**${number} 2)${number} Switch to Beta Branch ${normal}\n"
|
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} 3)${fgred} Switch to Dev Branch ${normal}\n"
|
||||||
printf "${menu}**${number} 4)${safe} Just Update Containers ${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 "${menu}*********************************************${normal}\n"
|
||||||
printf "Please choose an option from the menu and enter or ${fgred}x to exit. ${normal}"
|
printf "Please choose an option from the menu and enter or ${fgred}x to exit. ${normal}"
|
||||||
read opt
|
read opt
|
||||||
|
@ -155,6 +157,17 @@ while [ $opt != '' ]
|
||||||
./update-containers.sh;
|
./update-containers.sh;
|
||||||
exit;
|
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;
|
x)exit;
|
||||||
;;
|
;;
|
||||||
\n)exit;
|
\n)exit;
|
||||||
|
@ -170,16 +183,13 @@ docker pull homeassistant/home-assistant:$TAG
|
||||||
docker rm --force homeassistant
|
docker rm --force homeassistant
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--name homeassistant \
|
--name homeassistant \
|
||||||
--privileged \
|
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-v /dev:/dev \
|
|
||||||
-v hass_config:/config \
|
-v hass_config:/config \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
-v /etc/timezone:/etc/timezone:ro \
|
-v /etc/timezone:/etc/timezone:ro \
|
||||||
--net=host \
|
--net=host \
|
||||||
homeassistant/home-assistant:$TAG
|
homeassistant/home-assistant:$TAG
|
||||||
docker image prune -af
|
|
||||||
EOF
|
EOF
|
||||||
sudo chmod +x /root/update
|
sudo chmod +x /root/update
|
||||||
cat >$UPDATE_CONTAINERS_PATH <<'EOF'
|
cat >$UPDATE_CONTAINERS_PATH <<'EOF'
|
||||||
|
@ -198,7 +208,6 @@ for container in ${CONTAINER_LIST}; do
|
||||||
eval ${DOCKER_COMMAND}
|
eval ${DOCKER_COMMAND}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
docker image prune -af
|
|
||||||
EOF
|
EOF
|
||||||
sudo chmod +x /root/update-containers.sh
|
sudo chmod +x /root/update-containers.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue