The container update works now.

Now, container updated when choice Nr.1 is selected (Update system and containers).
Added choice Nr.4 for Remove ALL Unused Images.
pull/1304/head
glerak 2 years ago committed by GitHub
parent 17bce637d7
commit a7c97e9a28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 62
      ct/podman-homeassistant.sh

@ -86,43 +86,43 @@ if [ "$UPD" == "1" ]; then
exit exit
fi fi
if [ "$UPD" == "2" ]; then if [ "$UPD" == "2" ]; then
msg_info "Installing Home Assistant Comunity Store (HACS)" msg_info "Installing Home Assistant Comunity Store (HACS)"
apt update &>/dev/null apt update &>/dev/null
apt install unzip &>/dev/null apt install unzip &>/dev/null
cd /var/lib/containers/storage/volumes/hass_config/_data cd /var/lib/containers/storage/volumes/hass_config/_data
bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null
msg_ok "Installed Home Assistant Comunity Store (HACS)" msg_ok "Installed Home Assistant Comunity Store (HACS)"
echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n"
exit exit
fi fi
if [ "$UPD" == "3" ]; then if [ "$UPD" == "3" ]; then
IP=$(hostname -I | awk '{print $1}') IP=$(hostname -I | awk '{print $1}')
msg_info "Installing FileBrowser" msg_info "Installing FileBrowser"
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null
filebrowser config init -a '0.0.0.0' &>/dev/null filebrowser config init -a '0.0.0.0' &>/dev/null
filebrowser config set -a '0.0.0.0' &>/dev/null filebrowser config set -a '0.0.0.0' &>/dev/null
filebrowser users add admin changeme --perm.admin &>/dev/null filebrowser users add admin changeme --perm.admin &>/dev/null
msg_ok "Installed FileBrowser" msg_ok "Installed FileBrowser"
msg_info "Creating Service" msg_info "Creating Service"
service_path="/etc/systemd/system/filebrowser.service" service_path="/etc/systemd/system/filebrowser.service"
echo "[Unit] echo "[Unit]
Description=Filebrowser Description=Filebrowser
After=network-online.target After=network-online.target
[Service] [Service]
User=root User=root
WorkingDirectory=/root/ WorkingDirectory=/root/
ExecStart=/usr/local/bin/filebrowser -r / ExecStart=/usr/local/bin/filebrowser -r /
[Install] [Install]
WantedBy=default.target" >$service_path WantedBy=default.target" >$service_path
systemctl enable --now filebrowser.service &>/dev/null systemctl enable --now filebrowser.service &>/dev/null
msg_ok "Created Service" msg_ok "Created Service"
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "FileBrowser should be reachable by going to the following URL. echo -e "FileBrowser should be reachable by going to the following URL.
${BL}http://$IP:8080${CL} admin|changeme\n" ${BL}http://$IP:8080${CL} admin|changeme\n"
exit exit
fi fi
if [ "$UPD" == "4" ]; then if [ "$UPD" == "4" ]; then
msg_info "Removing ALL Unused Images" msg_info "Removing ALL Unused Images"

Loading…
Cancel
Save