From ad18c05686456f99deb731d6bab82a8b703cf8af Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:09:10 +0100 Subject: [PATCH] Massive Update (Remove StorageCheck (old) + Add Ressource & StorageCheck, Remove Whiptail, Remove PCT Ressource Set (#333) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Massive Update (Remove StorageCheck (old) + Add Ressource & StorageCheck, Remove Whiptail, Remove PCT Ressource Set * Update calibre-web.sh * Update cockpit.sh * Update cronicle.sh * Update homeassistant-core.sh * Update podman-homeassistant.sh * Update node-red.sh * Update plex.sh * Update wallos.sh * Revert "Update wallos.sh" This reverts commit ea6311e19076b3c290eb1e4dd5cb04afd56d0f56. * Update homeassistant.sh * Update ct/cronicle.sh Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --------- Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --- ct/actualbudget.sh | 8 +++----- ct/adguard.sh | 2 ++ ct/adventurelog.sh | 6 ++---- ct/agentdvr.sh | 2 ++ ct/apache-cassandra.sh | 2 ++ ct/apache-couchdb.sh | 2 ++ ct/apt-cacher-ng.sh | 2 ++ ct/archivebox.sh | 6 ++---- ct/aria2.sh | 2 ++ ct/audiobookshelf.sh | 2 ++ ct/autobrr.sh | 2 ++ ct/bazarr.sh | 2 ++ ct/blocky.sh | 2 ++ ct/bookstack.sh | 6 ++---- ct/bunkerweb.sh | 2 ++ ct/caddy.sh | 2 ++ ct/calibre-web.sh | 9 +++------ ct/casaos.sh | 2 ++ ct/changedetection.sh | 2 ++ ct/channels.sh | 2 ++ ct/cloudflared.sh | 2 ++ ct/cockpit.sh | 4 +++- ct/commafeed.sh | 2 ++ ct/cronicle.sh | 4 +++- ct/daemonsync.sh | 2 ++ ct/dashy.sh | 2 ++ ct/debian.sh | 2 ++ ct/deconz.sh | 2 ++ ct/deluge.sh | 2 ++ ct/docker.sh | 2 ++ ct/dockge.sh | 2 ++ ct/emby.sh | 2 ++ ct/emqx.sh | 2 ++ ct/ersatztv.sh | 2 ++ ct/esphome.sh | 2 ++ ct/evcc.sh | 2 ++ ct/fenrus.sh | 2 ++ ct/fhem.sh | 2 ++ ct/flaresolverr.sh | 7 ++----- ct/flowiseai.sh | 7 ++----- ct/forgejo.sh | 2 ++ ct/frigate.sh | 6 +++--- ct/gitea.sh | 2 ++ ct/go2rtc.sh | 2 ++ ct/gokapi.sh | 2 ++ ct/gotify.sh | 2 ++ ct/grafana.sh | 2 ++ ct/grocy.sh | 2 ++ ct/headscale.sh | 3 ++- ct/heimdall-dashboard.sh | 2 ++ ct/hivemq.sh | 2 ++ ct/homarr.sh | 6 ++---- ct/homeassistant-core.sh | 4 +++- ct/homeassistant.sh | 5 ++++- ct/homebox.sh | 6 ++---- ct/homebridge.sh | 2 ++ ct/homepage.sh | 2 ++ ct/homer.sh | 2 ++ ct/hyperhdr.sh | 2 ++ ct/hyperion.sh | 2 ++ ct/influxdb.sh | 2 ++ ct/iobroker.sh | 2 ++ ct/iventoy.sh | 3 +++ ct/jackett.sh | 2 ++ ct/jellyfin.sh | 2 ++ ct/jellyseerr.sh | 12 ++---------- ct/kavita.sh | 2 ++ ct/keycloak.sh | 2 ++ ct/kubo.sh | 2 ++ ct/lazylibrarian.sh | 2 ++ ct/lidarr.sh | 2 ++ ct/linkwarden.sh | 4 ++-- ct/lldap.sh | 2 ++ ct/mafl.sh | 8 ++------ ct/magicmirror.sh | 2 ++ ct/mariadb.sh | 2 ++ ct/matterbridge.sh | 2 ++ ct/mediamtx.sh | 3 ++- ct/medusa.sh | 2 ++ ct/memos.sh | 2 ++ ct/meshcentral.sh | 2 ++ ct/metube.sh | 6 ++---- ct/mongodb.sh | 2 ++ ct/motioneye.sh | 2 ++ ct/mqtt.sh | 2 ++ ct/myspeed.sh | 6 ++---- ct/mysql.sh | 2 ++ ct/n8n.sh | 2 ++ ct/navidrome.sh | 2 ++ ct/neo4j.sh | 2 ++ ct/nextcloudpi.sh | 2 ++ ct/nginxproxymanager.sh | 6 ++---- ct/nocodb.sh | 2 ++ ct/node-red.sh | 4 +++- ct/notifiarr.sh | 2 ++ ct/ntfy.sh | 2 ++ ct/nzbget.sh | 2 ++ ct/octoprint.sh | 2 ++ ct/ollama.sh | 2 ++ ct/omada.sh | 2 ++ ct/ombi.sh | 2 ++ ct/omv.sh | 2 ++ ct/openhab.sh | 2 ++ ct/openobserve.sh | 2 ++ ct/openwebui.sh | 2 ++ ct/overseerr.sh | 2 ++ ct/owncast.sh | 2 ++ ct/pairdrop.sh | 2 ++ ct/paperless-ngx.sh | 2 ++ ct/pbs.sh | 2 ++ ct/peanut.sh | 7 ++----- ct/petio.sh | 2 ++ ct/photoprism.sh | 2 ++ ct/pialert.sh | 2 ++ ct/pihole.sh | 2 ++ ct/pingvin.sh | 2 ++ ct/plex.sh | 5 +++-- ct/podman-homeassistant.sh | 5 ++++- ct/podman.sh | 2 ++ ct/postgresql.sh | 2 ++ ct/prometheus.sh | 2 ++ ct/prowlarr.sh | 2 ++ ct/qbittorrent.sh | 2 ++ ct/rabbitmq.sh | 6 ++---- ct/radarr.sh | 2 ++ ct/readarr.sh | 2 ++ ct/readeck.sh | 2 ++ ct/recyclarr.sh | 2 ++ ct/redis.sh | 2 ++ ct/rtsptoweb.sh | 2 ++ ct/runtipi.sh | 2 ++ ct/sabnzbd.sh | 2 ++ ct/scrypted.sh | 2 ++ ct/sftpgo.sh | 2 ++ ct/shinobi.sh | 2 ++ ct/smokeping.sh | 2 ++ ct/sonarr.sh | 2 ++ ct/spoolman.sh | 6 ++---- ct/stirling-pdf.sh | 2 ++ ct/syncthing.sh | 2 ++ ct/tandoor.sh | 8 ++------ ct/tasmoadmin.sh | 2 ++ ct/tautulli.sh | 2 ++ ct/tdarr.sh | 2 ++ ct/technitiumdns.sh | 2 ++ ct/threadfin.sh | 2 ++ ct/tianji.sh | 12 ++---------- ct/traccar.sh | 2 ++ ct/traefik.sh | 2 ++ ct/transmission.sh | 2 ++ ct/trilium.sh | 2 ++ ct/ubuntu.sh | 2 ++ ct/umami.sh | 11 ++--------- ct/umbrel.sh | 2 ++ ct/unifi.sh | 2 ++ ct/unmanic.sh | 2 ++ ct/uptimekuma.sh | 2 ++ ct/vaultwarden.sh | 5 ----- ct/vikunja.sh | 6 ++---- ct/wastebin.sh | 2 ++ ct/watchyourlan.sh | 2 ++ ct/wavelog.sh | 2 ++ ct/whisparr.sh | 2 ++ ct/whoogle.sh | 2 ++ ct/wikijs.sh | 2 ++ ct/wireguard.sh | 3 +++ ct/yunohost.sh | 2 ++ ct/zabbix.sh | 2 ++ ct/zigbee2mqtt.sh | 2 ++ ct/zipline.sh | 6 ++---- ct/zoraxy.sh | 2 ++ ct/zwave-js-ui.sh | 2 ++ 172 files changed, 356 insertions(+), 135 deletions(-) diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index 80d1e0fb..009fb952 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -54,8 +54,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/actualbudget ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 msg_info "Updating ${APP}" systemctl stop actualbudget.service cd /opt/actualbudget @@ -69,10 +70,7 @@ exit start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 1024 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" + msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5006${CL} \n" diff --git a/ct/adguard.sh b/ct/adguard.sh index dd07e48b..165e6661 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -54,6 +54,8 @@ function default_settings() { } function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/AdGuardHome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "Adguard Home should be updated via the user interface." exit diff --git a/ct/adventurelog.sh b/ct/adventurelog.sh index 5fd53b0b..f7806968 100644 --- a/ct/adventurelog.sh +++ b/ct/adventurelog.sh @@ -54,11 +54,9 @@ function default_settings() { } function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/adventurelog ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(curl -s https://api.github.com/repos/seanmorley15/AdventureLog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Stopping Services" diff --git a/ct/agentdvr.sh b/ct/agentdvr.sh index 006d75da..82cab243 100644 --- a/ct/agentdvr.sh +++ b/ct/agentdvr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/agentdvr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/apache-cassandra.sh b/ct/apache-cassandra.sh index f5b0aea7..81486eff 100644 --- a/ct/apache-cassandra.sh +++ b/ct/apache-cassandra.sh @@ -56,6 +56,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/cassandra.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/apache-couchdb.sh b/ct/apache-couchdb.sh index 278ba73d..4aab856a 100644 --- a/ct/apache-couchdb.sh +++ b/ct/apache-couchdb.sh @@ -56,6 +56,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/couchdb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/apt-cacher-ng.sh b/ct/apt-cacher-ng.sh index 9dc1115a..f363b0e3 100644 --- a/ct/apt-cacher-ng.sh +++ b/ct/apt-cacher-ng.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/archivebox.sh b/ct/archivebox.sh index 0ad2ab7b..7569b9dc 100644 --- a/ct/archivebox.sh +++ b/ct/archivebox.sh @@ -54,11 +54,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/archivebox ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi msg_info "Stopping ${APP}" systemctl stop archivebox msg_ok "Stopped ${APP}" diff --git a/ct/aria2.sh b/ct/aria2.sh index e58e51a6..e23e7fa2 100644 --- a/ct/aria2.sh +++ b/ct/aria2.sh @@ -53,6 +53,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 5c57a966..8edc13bf 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/trusted.gpg.d/audiobookshelf-ppa.asc ]]; then msg_error "No ${APP} Installation Found!"; exit; fi echo "This application receives updates through the APT package manager." exit diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 5cd19e7a..d4d98a11 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /root/.config/autobrr/config.toml ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ${APP} LXC" systemctl stop autobrr.service diff --git a/ct/bazarr.sh b/ct/bazarr.sh index 7897f4c4..f6118d99 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var/lib/bazarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/blocky.sh b/ct/blocky.sh index 634f21c2..3bd6ed7b 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/bookstack.sh b/ct/bookstack.sh index 5e908874..0d52f390 100644 --- a/ct/bookstack.sh +++ b/ct/bookstack.sh @@ -55,11 +55,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/bookstack ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(curl -s https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Stopping Apache2" diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index 7d2cfdbf..2a9c2b28 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /etc/bunkerweb ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') diff --git a/ct/caddy.sh b/ct/caddy.sh index 12c85207..0945c298 100644 --- a/ct/caddy.sh +++ b/ct/caddy.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /etc/caddy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index a8c7fad9..5d8a9418 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -54,12 +54,13 @@ function default_settings() { } function update_script() { + header_info + check_container_storage + check_container_resources if [[ ! -f /etc/systemd/system/cps.service ]]; then msg_error "No ${APP} Installation Found!" exit fi - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 - header_info msg_info "Updating $APP LXC" systemctl stop cps cd /opt/kepubify @@ -156,10 +157,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 512 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8083${CL} \n" diff --git a/ct/casaos.sh b/ct/casaos.sh index c3fda0b9..ebd0050c 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/changedetection.sh b/ct/changedetection.sh index cb4c8f84..817862c1 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/changedetection.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then diff --git a/ct/channels.sh b/ct/channels.sh index b42361fb..dad211a5 100644 --- a/ct/channels.sh +++ b/ct/channels.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/channels-dvr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index 66749925..cc6d1e82 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/cockpit.sh b/ct/cockpit.sh index 167e766c..213817e7 100644 --- a/ct/cockpit.sh +++ b/ct/cockpit.sh @@ -54,6 +54,9 @@ function default_settings() { } function update_script() { +header_info +check_container_storage +check_container_resources if [[ ! -d /etc/cockpit ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update LXC" ON \ @@ -62,7 +65,6 @@ UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radio "4" "Install cockpit-navigator" OFF \ 3>&1 1>&2 2>&3) -header_info if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/commafeed.sh b/ct/commafeed.sh index 2ad9262f..0f47d12c 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/commafeed ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -sL https://api.github.com/repos/Athou/commafeed/releases/latest | grep '"tag_name":' | cut -d'"' -f4) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/cronicle.sh b/ct/cronicle.sh index aa5423e2..0915c4f9 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -53,13 +53,15 @@ function default_settings() { } function update_script() { +header_info +check_container_storage +check_container_resources UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP}" ON \ "2" "Install ${APP} Worker" OFF \ 3>&1 1>&2 2>&3) if [ "$UPD" == "1" ]; then -header_info if [[ ! -d /opt/cronicle ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index 4e8069e2..07183226 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/dashy.sh b/ct/dashy.sh index f4c80614..6bcacc35 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/dashy/public/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -sL https://api.github.com/repos/Lissy93/dashy/releases/latest | grep '"tag_name":' | cut -d'"' -f4) diff --git a/ct/debian.sh b/ct/debian.sh index 0af0c497..6120d5ab 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/deconz.sh b/ct/deconz.sh index f5df37c6..c994a8ab 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/deconz.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/deluge.sh b/ct/deluge.sh index e938be22..88a0ccd5 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/deluged.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/docker.sh b/ct/docker.sh index 2b9a880c..b45ba062 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/dockge.sh b/ct/dockge.sh index 38f6eb2a..d05023c0 100644 --- a/ct/dockge.sh +++ b/ct/dockge.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/dockge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" cd /opt/dockge diff --git a/ct/emby.sh b/ct/emby.sh index 452affaa..a6c913b4 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/emby-server ]]; then msg_error "No ${APP} Installation Found!"; exit; fi LATEST=$(curl -sL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Stopping ${APP}" diff --git a/ct/emqx.sh b/ct/emqx.sh index 59aeeb66..070e38ff 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/ersatztv.sh b/ct/ersatztv.sh index 52cb9727..75ff2757 100644 --- a/ct/ersatztv.sh +++ b/ct/ersatztv.sh @@ -56,6 +56,8 @@ function default_settings() { } function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/ErsatzTV ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ErsatzTV" diff --git a/ct/esphome.sh b/ct/esphome.sh index d5184a8e..ee091265 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/esphomeDashboard.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ESPHome" systemctl stop esphomeDashboard diff --git a/ct/evcc.sh b/ct/evcc.sh index 17834d69..003409e1 100644 --- a/ct/evcc.sh +++ b/ct/evcc.sh @@ -53,6 +53,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/evcc-stable.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating evcc LXC" apt update &>/dev/null diff --git a/ct/fenrus.sh b/ct/fenrus.sh index af76aca1..0138a9ce 100644 --- a/ct/fenrus.sh +++ b/ct/fenrus.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/${APP} ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/fhem.sh b/ct/fhem.sh index 482373be..6ffd51ad 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/fhem.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/flaresolverr.sh b/ct/flaresolverr.sh index b3018bdc..1946c932 100644 --- a/ct/flaresolverr.sh +++ b/ct/flaresolverr.sh @@ -55,8 +55,9 @@ function default_settings() { function update_script() { header_info + check_container_storage + check_container_resources if [[ ! -f /etc/systemd/system/flaresolverr.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 RELEASE=$(wget -q https://github.com/FlareSolverr/FlareSolverr/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Updating $APP LXC" @@ -77,10 +78,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 512 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8191${CL} \n" diff --git a/ct/flowiseai.sh b/ct/flowiseai.sh index b2fd762c..2b58a739 100644 --- a/ct/flowiseai.sh +++ b/ct/flowiseai.sh @@ -54,8 +54,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/flowise.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 msg_info "Updating ${APP}" systemctl stop flowise npm install -g flowise --upgrade @@ -68,10 +69,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 2048 -pct set $CTID -cores 2 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/forgejo.sh b/ct/forgejo.sh index 606430b9..8199ec57 100644 --- a/ct/forgejo.sh +++ b/ct/forgejo.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/forgejo ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ${APP}" systemctl stop forgejo diff --git a/ct/frigate.sh b/ct/frigate.sh index 14dd5f61..ca0104f8 100644 --- a/ct/frigate.sh +++ b/ct/frigate.sh @@ -54,6 +54,9 @@ function default_settings() { } function update_script() { + header_info + check_container_storage + check_container_resources if [[ ! -f /etc/systemd/system/frigate.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "To update Frigate, create a new container and transfer your configuration." exit @@ -63,9 +66,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 1024 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5000${CL} \n" diff --git a/ct/gitea.sh b/ct/gitea.sh index 7b09f0b2..0779cc8d 100644 --- a/ct/gitea.sh +++ b/ct/gitea.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /usr/local/bin/gitea ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(wget -q https://github.com/go-gitea/gitea/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//') msg_info "Updating $APP to ${RELEASE}" diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 03ad250c..741ee0d2 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/go2rtc ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" systemctl stop go2rtc diff --git a/ct/gokapi.sh b/ct/gokapi.sh index eafd7979..79814f5f 100644 --- a/ct/gokapi.sh +++ b/ct/gokapi.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/gokapi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/gotify.sh b/ct/gotify.sh index 5ef748f7..c80fb9ef 100644 --- a/ct/gotify.sh +++ b/ct/gotify.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/gotify ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/gotify/server/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') diff --git a/ct/grafana.sh b/ct/grafana.sh index 36c6832d..7042a2fe 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/grafana.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" apt-get update &>/dev/null diff --git a/ct/grocy.sh b/ct/grocy.sh index 58e21318..945c7aea 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi php_version=$(php -v | head -n 1 | awk '{print $2}') if [[ ! $php_version == "8.3"* ]]; then diff --git a/ct/headscale.sh b/ct/headscale.sh index 619e2475..5138b811 100644 --- a/ct/headscale.sh +++ b/ct/headscale.sh @@ -54,8 +54,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /etc/headscale ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - RELEASE=$(curl -s https://api.github.com/repos/juanfont/headscale/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping ${APP}" diff --git a/ct/heimdall-dashboard.sh b/ct/heimdall-dashboard.sh index 1d3e44d0..265acb0b 100644 --- a/ct/heimdall-dashboard.sh +++ b/ct/heimdall-dashboard.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then diff --git a/ct/hivemq.sh b/ct/hivemq.sh index 26a92005..9356ad90 100644 --- a/ct/hivemq.sh +++ b/ct/hivemq.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/homarr.sh b/ct/homarr.sh index fa3ca417..1e7210b3 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -55,11 +55,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Stopping Services" diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 4a673328..001f98f1 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -53,6 +53,9 @@ function default_settings() { } function update_script() { + header_info + check_container_storage + check_container_resources if [[ ! -d /srv/homeassistant ]]; then msg_error "No ${APP} Installation Found!" exit @@ -64,7 +67,6 @@ function update_script() { "2" "Install HACS" OFF \ "3" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) - header_info if [ "$UPD" == "1" ]; then if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SELECT BRANCH" --yesno "Use Beta Branch?" 10 58); then clear diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 7a244407..bb0a325a 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -53,6 +53,9 @@ function default_settings() { } function update_script() { + header_info + check_container_storage + check_container_resources if [[ ! -d /var/lib/docker/volumes/hass_config/_data ]]; then msg_error "No ${APP} Installation Found!" exit @@ -63,7 +66,7 @@ function update_script() { "3" "Install HACS" OFF \ "4" "Install FileBrowser" OFF \ 3>&1 1>&2 2>&3) - header_info + if [ "$UPD" == "1" ]; then msg_info "Updating All Containers" CONTAINER_LIST="${1:-$(docker ps -q)}" diff --git a/ct/homebox.sh b/ct/homebox.sh index b05ba064..2441bc0b 100644 --- a/ct/homebox.sh +++ b/ct/homebox.sh @@ -54,11 +54,9 @@ function default_settings() { } function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /opt/homebox ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(curl -s https://api.github.com/repos/sysadminsmedia/homebox/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Stopping ${APP}" diff --git a/ct/homebridge.sh b/ct/homebridge.sh index e511b727..b371d9c0 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/homebridge.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/homepage.sh b/ct/homepage.sh index 4cda21ab..ddce1e8a 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/homepage ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then diff --git a/ct/homer.sh b/ct/homer.sh index 7aa5cbb5..bb2695d7 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/homer ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ${APP}" systemctl stop homer diff --git a/ct/hyperhdr.sh b/ct/hyperhdr.sh index 60d7b2d8..023a326f 100644 --- a/ct/hyperhdr.sh +++ b/ct/hyperhdr.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/hyperion.sh b/ct/hyperion.sh index 36541dd6..f9134e69 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/hyperion.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/influxdb.sh b/ct/influxdb.sh index 8cf91d48..6e4f683c 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/influxdata.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" apt-get update &>/dev/null diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 50ef85c5..eb5a1f80 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/iobroker ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/iventoy.sh b/ct/iventoy.sh index f58d7427..5e38f05f 100644 --- a/ct/iventoy.sh +++ b/ct/iventoy.sh @@ -53,6 +53,9 @@ function default_settings() { } function update_script() { +header_info +check_container_storage +check_container_resources if [[ ! -d /opt/iventoy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/jackett.sh b/ct/jackett.sh index 7548b7de..7f336510 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/jackett.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index 41c073a3..e1562352 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /usr/lib/jellyfin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index b4ac5c27..602ebad0 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -54,12 +54,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/jellyseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi -whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your Jellyseerr LXC to 4vcpu and 4096RAM for the build process before continuing" 10 75 if ! command -v pnpm &> /dev/null; then msg_error "pnpm not found. Installing..." npm install -g pnpm &>/dev/null @@ -107,11 +104,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 2048 -pct set $CTID -cores 2 -msg_ok "Set Container to Normal Resources" - msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:5055${CL} \n" diff --git a/ct/kavita.sh b/ct/kavita.sh index 3b2286d4..e80d6463 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/Kavita ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" systemctl stop kavita diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 43d9f44c..5dad21ca 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/keycloak.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" diff --git a/ct/kubo.sh b/ct/kubo.sh index 587cb66b..335690f2 100644 --- a/ct/kubo.sh +++ b/ct/kubo.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /usr/local/kubo ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then diff --git a/ct/lazylibrarian.sh b/ct/lazylibrarian.sh index 47f4f1b3..f6e1d1a6 100644 --- a/ct/lazylibrarian.sh +++ b/ct/lazylibrarian.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/LazyLibrarian/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping LazyLibrarian" systemctl stop lazylibrarian diff --git a/ct/lidarr.sh b/ct/lidarr.sh index ec04267b..11e3359b 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var/lib/lidarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 7292d503..1ba50c52 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -65,7 +65,7 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} msg_info "Updating ${APP} to ${RELEASE}" cd /opt - mv /opt/linkwarden /opt/linkwarden_bak + mv /opt/linkwarden/.env /opt/.env RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q "https://github.com/linkwarden/linkwarden/archive/refs/tags/${RELEASE}.zip" unzip -q ${RELEASE}.zip @@ -74,7 +74,7 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} yarn &>/dev/null npx playwright install-deps &>/dev/null yarn playwright install &>/dev/null - cp /opt/linkwarden_bak/.env /opt/linkwarden/.env + cp /opt/.env /opt/linkwarden/.env yarn build &>/dev/null yarn prisma migrate deploy &>/dev/null echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/ct/lldap.sh b/ct/lldap.sh index 8f47ef2a..a31ef14f 100644 --- a/ct/lldap.sh +++ b/ct/lldap.sh @@ -56,6 +56,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/lldap.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" apt update diff --git a/ct/mafl.sh b/ct/mafl.sh index df3dc8f4..730671d5 100644 --- a/ct/mafl.sh +++ b/ct/mafl.sh @@ -54,8 +54,9 @@ function default_settings() { function update_script() { header_info + check_container_storage + check_container_resources if [[ ! -d /opt/mafl ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 RELEASE=$(curl -s https://api.github.com/repos/hywax/mafl/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Updating Mafl to v${RELEASE} (Patience)" systemctl stop mafl @@ -75,11 +76,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 1024 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" - msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index 55ef4905..6a92747f 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/magicmirror ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 0341ddc7..52623109 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/mariadb.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/matterbridge.sh b/ct/matterbridge.sh index 63254c06..8cac08a8 100644 --- a/ct/matterbridge.sh +++ b/ct/matterbridge.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /root/Matterbridge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "Update via the Matterbridge UI" exit diff --git a/ct/mediamtx.sh b/ct/mediamtx.sh index 3992c0cb..f6acb4d6 100644 --- a/ct/mediamtx.sh +++ b/ct/mediamtx.sh @@ -55,8 +55,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/mediamtx/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - msg_error "There is currently no update path available." exit } diff --git a/ct/medusa.sh b/ct/medusa.sh index 24a77f34..e9e49413 100644 --- a/ct/medusa.sh +++ b/ct/medusa.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/medusa ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ${APP}" systemctl stop medusa diff --git a/ct/memos.sh b/ct/memos.sh index da4ae615..ab7017dd 100644 --- a/ct/memos.sh +++ b/ct/memos.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/memos ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP (Patience)" cd /opt/memos diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index bdb3a648..6f2ebe7c 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/meshcentral ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/metube.sh b/ct/metube.sh index 425683c6..ff09ace4 100644 --- a/ct/metube.sh +++ b/ct/metube.sh @@ -54,11 +54,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/metube ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi msg_info "Stopping ${APP} Service" systemctl stop metube msg_ok "Stopped ${APP} Service" diff --git a/ct/mongodb.sh b/ct/mongodb.sh index e255b9a7..44bbf386 100644 --- a/ct/mongodb.sh +++ b/ct/mongodb.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/mongodb-org-7.0.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 54565611..76e2cb65 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/motioneye.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" pip install motioneye --upgrade &>/dev/null diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 70509666..0015fbb8 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/mosquitto/conf.d/default.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/myspeed.sh b/ct/myspeed.sh index 99c7ef6c..4d9601f2 100644 --- a/ct/myspeed.sh +++ b/ct/myspeed.sh @@ -56,11 +56,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/myspeed ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(wget -q https://github.com/gnmyt/myspeed/releases/latest -O - | grep "title>Release" | cut -d " " -f 5) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/mysql.sh b/ct/mysql.sh index 02ffbb6d..06352bcd 100644 --- a/ct/mysql.sh +++ b/ct/mysql.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /usr/share/keyrings/mysql.gpg ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/n8n.sh b/ct/n8n.sh index 22a58c0d..ead77f73 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/n8n.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then diff --git a/ct/navidrome.sh b/ct/navidrome.sh index a6a0b38b..6a33bd23 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/navidrome ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Stopping ${APP}" diff --git a/ct/neo4j.sh b/ct/neo4j.sh index a23f8882..95757687 100644 --- a/ct/neo4j.sh +++ b/ct/neo4j.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /etc/neo4j ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" apt-get update &>/dev/null diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index 7eb52c7d..c9a51281 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /lib/systemd/system/nextcloud-domain.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index bfaa8222..476989bb 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -55,11 +55,12 @@ function default_settings() { function update_script() { header_info + check_container_storage + check_container_resources if [[ ! -f /lib/systemd/system/npm.service ]]; then msg_error "No ${APP} Installation Found!" exit fi - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 if ! command -v pnpm &> /dev/null; then msg_info "Installing pnpm" #export NODE_OPTIONS=--openssl-legacy-provider @@ -187,9 +188,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:81${CL}\n" diff --git a/ct/nocodb.sh b/ct/nocodb.sh index e8fd6e71..98755f1b 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/nocodb.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" systemctl stop nocodb.service diff --git a/ct/node-red.sh b/ct/node-red.sh index c5ff805e..b1fac4c2 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -53,12 +53,14 @@ function default_settings() { } function update_script() { +header_info +check_container_storage +check_container_resources if [[ ! -d /root/.node-red ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \ "1" "Update ${APP}" ON \ "2" "Install Themes" OFF \ 3>&1 1>&2 2>&3) -header_info if [ "$UPD" == "1" ]; then if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then diff --git a/ct/notifiarr.sh b/ct/notifiarr.sh index ede2911c..3ab68b62 100644 --- a/ct/notifiarr.sh +++ b/ct/notifiarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/golift.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" apt-get update &>/dev/null diff --git a/ct/ntfy.sh b/ct/ntfy.sh index 9cde97ed..d9031f59 100644 --- a/ct/ntfy.sh +++ b/ct/ntfy.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/nzbget.sh b/ct/nzbget.sh index da5c7d63..e8b83bd5 100644 --- a/ct/nzbget.sh +++ b/ct/nzbget.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /lib/systemd/system/nzbget.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/octoprint.sh b/ct/octoprint.sh index f132db14..bf5b634b 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/octoprint ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping OctoPrint" systemctl stop octoprint diff --git a/ct/ollama.sh b/ct/ollama.sh index b8ad9a60..1d5bf471 100644 --- a/ct/ollama.sh +++ b/ct/ollama.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/ollama ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" apt-get update &>/dev/null diff --git a/ct/omada.sh b/ct/omada.sh index 0ff1a810..ceaa9c8a 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi latest_url=$(curl -fsSL "https://www.tp-link.com/en/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1) latest_version=$(basename "${latest_url}") diff --git a/ct/ombi.sh b/ct/ombi.sh index 70eeccdc..d378a11c 100644 --- a/ct/ombi.sh +++ b/ct/ombi.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/ombi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -sL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then diff --git a/ct/omv.sh b/ct/omv.sh index e5ae9d14..48e0ca0c 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/openmediavault.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/openhab.sh b/ct/openhab.sh index 7c9f3257..f4c0fdd8 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/openhab.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/openobserve.sh b/ct/openobserve.sh index d4f50109..3ec7c50e 100644 --- a/ct/openobserve.sh +++ b/ct/openobserve.sh @@ -56,6 +56,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/openobserve/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" systemctl stop openobserve diff --git a/ct/openwebui.sh b/ct/openwebui.sh index ecbcb9b6..a8c28ac9 100644 --- a/ct/openwebui.sh +++ b/ct/openwebui.sh @@ -56,6 +56,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/open-webui ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} (Patience)" cd /opt/open-webui diff --git a/ct/overseerr.sh b/ct/overseerr.sh index edd1c8e1..e489be02 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/overseerr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" systemctl stop overseerr diff --git a/ct/owncast.sh b/ct/owncast.sh index 34306eb1..95c0a891 100644 --- a/ct/owncast.sh +++ b/ct/owncast.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/owncast ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/pairdrop.sh b/ct/pairdrop.sh index 28cf8a96..baf4783c 100644 --- a/ct/pairdrop.sh +++ b/ct/pairdrop.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/pairdrop ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" systemctl stop pairdrop diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index d7a1947c..3aac6ab1 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -65,6 +65,8 @@ function update_script() { "2" "Paperless-ngx Credentials" OFF \ 3>&1 1>&2 2>&3) header_info + check_container_storage + check_container_resources if [ "$UPD" == "1" ]; then if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then if [[ "$(gs --version 2>/dev/null)" != "10.04.0" ]]; then diff --git a/ct/pbs.sh b/ct/pbs.sh index a1f08711..11d6be38 100644 --- a/ct/pbs.sh +++ b/ct/pbs.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/peanut.sh b/ct/peanut.sh index 0ec83da9..13fd94de 100644 --- a/ct/peanut.sh +++ b/ct/peanut.sh @@ -55,8 +55,9 @@ function default_settings() { function update_script() { header_info + check_container_storage + check_container_resources if [[ ! -f /etc/systemd/system/peanut.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 RELEASE=$(curl -sL https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep '"tag_name":' | cut -d'"' -f4) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating $APP to ${RELEASE}" @@ -83,10 +84,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 1024 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/petio.sh b/ct/petio.sh index a05b4e5d..4e8d9541 100644 --- a/ct/petio.sh +++ b/ct/petio.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/Petio ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" systemctl stop petio.service diff --git a/ct/photoprism.sh b/ct/photoprism.sh index aeec30c2..864de039 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info + check_container_storage + check_container_resources if [[ ! -d /opt/photoprism ]]; then msg_error "No ${APP} Installation Found!" exit diff --git a/ct/pialert.sh b/ct/pialert.sh index 6be4b07f..ee0de937 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/pialert ]]; then msg_error "No ${APP} Installation Found!"; exit; fi bash -c "$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)" -s --lxc msg_ok "Updated $APP" diff --git a/ct/pihole.sh b/ct/pihole.sh index 4bf2be6e..f26c120e 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /etc/pihole ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" set +e diff --git a/ct/pingvin.sh b/ct/pingvin.sh index 29fec06f..e2a2bd3d 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/pingvin-share ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping Pingvin Share" systemctl stop pm2-root.service diff --git a/ct/plex.sh b/ct/plex.sh index ba79c08d..53977859 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -53,13 +53,14 @@ function default_settings() { } function update_script() { +header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select \nplexupdate info >> https://github.com/mrworf/plexupdate" 10 59 2 \ "1" "Update LXC" ON \ "2" "Install plexupdate" OFF \ 3>&1 1>&2 2>&3) - -header_info if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 34d42f15..4498a6a6 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -57,6 +57,9 @@ function default_settings() { } function update_script() { +header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/homeassistant.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \ "1" "Update system and containers" ON \ @@ -64,7 +67,7 @@ function update_script() { "3" "Install FileBrowser" OFF \ "4" "Remove ALL Unused Images" OFF \ 3>&1 1>&2 2>&3) -header_info + if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/podman.sh b/ct/podman.sh index 5e8d542d..7c29ca8f 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/containers/registries.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/postgresql.sh b/ct/postgresql.sh index da2940a7..a20c5e7b 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/pgdg.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/prometheus.sh b/ct/prometheus.sh index af62545b..b2447035 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/prometheus.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 798cf319..38bced48 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var/lib/prowlarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 3474e606..7544f784 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/qbittorrent-nox.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/rabbitmq.sh b/ct/rabbitmq.sh index c422f902..0ff43448 100644 --- a/ct/rabbitmq.sh +++ b/ct/rabbitmq.sh @@ -56,11 +56,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /etc/rabbitmq ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi msg_info "Stopping ${APP} Service" systemctl stop rabbitmq-server msg_ok "Stopped ${APP} Service" diff --git a/ct/radarr.sh b/ct/radarr.sh index 62ada6ef..a7218ef8 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var/lib/radarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/readarr.sh b/ct/readarr.sh index 1c0cc489..10c6280b 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var/lib/readarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/readeck.sh b/ct/readeck.sh index 1fb4e15a..29233e16 100644 --- a/ct/readeck.sh +++ b/ct/readeck.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/readeck ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" LATEST=$(curl -s https://codeberg.org/readeck/readeck/releases/ | grep -oP '(?<=Version )\d+\.\d+\.\d+' | head -1) diff --git a/ct/recyclarr.sh b/ct/recyclarr.sh index b17c10ed..ea2bb186 100644 --- a/ct/recyclarr.sh +++ b/ct/recyclarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /root/.config/recyclarr/recyclarr.yml ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" diff --git a/ct/redis.sh b/ct/redis.sh index 66d47015..32d0ee55 100644 --- a/ct/redis.sh +++ b/ct/redis.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /lib/systemd/system/redis-server.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/rtsptoweb.sh b/ct/rtsptoweb.sh index 8bcf415e..a2db3583 100644 --- a/ct/rtsptoweb.sh +++ b/ct/rtsptoweb.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/runtipi.sh b/ct/runtipi.sh index 44d2e8d2..2af52c24 100644 --- a/ct/runtipi.sh +++ b/ct/runtipi.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/runtipi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi cd /opt/runtipi && ./runtipi-cli update latest exit diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 65d7f7e8..10b1b549 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/sabnzbd ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/scrypted.sh b/ct/scrypted.sh index 0fc2547d..44d001ed 100644 --- a/ct/scrypted.sh +++ b/ct/scrypted.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/scrypted.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/sftpgo.sh b/ct/sftpgo.sh index fc4061f6..203ea956 100644 --- a/ct/sftpgo.sh +++ b/ct/sftpgo.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/shinobi.sh b/ct/shinobi.sh index 68182398..609cae77 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/Shinobi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating Shinobi LXC" cd /opt/Shinobi diff --git a/ct/smokeping.sh b/ct/smokeping.sh index fa3ae66d..cb1e98a2 100644 --- a/ct/smokeping.sh +++ b/ct/smokeping.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if ! command -v smokeping &> /dev/null; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" diff --git a/ct/sonarr.sh b/ct/sonarr.sh index d47faf3c..b1cb114e 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/Sonarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP v4" systemctl stop sonarr.service diff --git a/ct/spoolman.sh b/ct/spoolman.sh index b4e4be5b..d1ba9ed9 100644 --- a/ct/spoolman.sh +++ b/ct/spoolman.sh @@ -55,11 +55,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/spoolman ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/stirling-pdf.sh b/ct/stirling-pdf.sh index 06239f24..67eaee05 100644 --- a/ct/stirling-pdf.sh +++ b/ct/stirling-pdf.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/Stirling-PDF ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" systemctl stop stirlingpdf diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 65cc4985..d771e03f 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/sources.list.d/syncthing.list ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/tandoor.sh b/ct/tandoor.sh index 2409971a..693c8a9f 100644 --- a/ct/tandoor.sh +++ b/ct/tandoor.sh @@ -55,8 +55,9 @@ function default_settings() { function update_script() { header_info + check_container_storage + check_container_resources if [[ ! -d /opt/tandoor ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 if cd /opt/tandoor && git pull | grep -q 'Already up to date'; then msg_ok "There is currently no update available." else @@ -80,11 +81,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 2048 -pct set $CTID -cores 2 -msg_ok "Set Container to Normal Resources" - msg_ok "Completed Successfully!\n" echo -e "${APP} Setup should be reachable by going to the following URL. ${BL}http://${IP}:8002${CL} \n" diff --git a/ct/tasmoadmin.sh b/ct/tasmoadmin.sh index bc949cdb..a99c012a 100644 --- a/ct/tasmoadmin.sh +++ b/ct/tasmoadmin.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/tautulli.sh b/ct/tautulli.sh index 1e5924da..59e1831b 100644 --- a/ct/tautulli.sh +++ b/ct/tautulli.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/Tautulli/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/tdarr.sh b/ct/tdarr.sh index 96ed6878..c6d5fddd 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/tdarr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index b7d6984e..73ff29ba 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /etc/dns ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" diff --git a/ct/threadfin.sh b/ct/threadfin.sh index 9ffbf868..9995ea15 100644 --- a/ct/threadfin.sh +++ b/ct/threadfin.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/threadfin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" systemctl stop threadfin.service diff --git a/ct/tianji.sh b/ct/tianji.sh index 54edc90d..e80a5248 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -54,14 +54,11 @@ function default_settings() { } function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/tianji ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(curl -s https://api.github.com/repos/msgbyte/tianji/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 msg_info "Stopping ${APP} Service" systemctl stop tianji msg_ok "Stopped ${APP} Service" @@ -105,11 +102,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 1024 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" - msg_ok "Completed Successfully!\n" echo -e "${APP} Setup should be reachable by going to the following URL. ${BL}http://${IP}:12345${CL} \n" diff --git a/ct/traccar.sh b/ct/traccar.sh index 497334ae..c0f7a5da 100644 --- a/ct/traccar.sh +++ b/ct/traccar.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/traccar ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_error "There is currently no update path available." exit diff --git a/ct/traefik.sh b/ct/traefik.sh index 54a6c6fc..6cfbfe20 100644 --- a/ct/traefik.sh +++ b/ct/traefik.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/traefik.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/traefik/traefik/releases | grep -oP '"tag_name":\s*"v\K[\d.]+?(?=")' | sort -V | tail -n 1) msg_info "Updating $APP LXC" diff --git a/ct/transmission.sh b/ct/transmission.sh index 3fa4f0cb..deaf8f74 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/transmission-daemon/settings.json ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/trilium.sh b/ct/trilium.sh index efc430aa..f6a7d60b 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/trilium ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 3df8920e..fe2851d9 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" apt-get update &>/dev/null diff --git a/ct/umami.sh b/ct/umami.sh index f746f7e3..0c37d001 100644 --- a/ct/umami.sh +++ b/ct/umami.sh @@ -54,12 +54,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/umami ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi msg_info "Stopping ${APP}" systemctl stop umami @@ -84,10 +81,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 1024 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:3000${CL} \n" diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 6e5ccf07..fa1bfb99 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources msg_info "Updating ${APP} LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/ct/unifi.sh b/ct/unifi.sh index 4c092cfb..5be90bda 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -58,6 +58,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" apt-get update --allow-releaseinfo-change diff --git a/ct/unmanic.sh b/ct/unmanic.sh index 8cb59458..a24633af 100644 --- a/ct/unmanic.sh +++ b/ct/unmanic.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/systemd/system/unmanic.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" pip3 install -U unmanic &>/dev/null diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index ca736b48..53667c18 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/uptime-kuma ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index be1b9f76..7b66d233 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -75,7 +75,6 @@ function update_script() { check_container_storage check_container_resources if [ "$UPD" == "1" ]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 msg_info "Stopping Vaultwarden" systemctl stop vaultwarden.service msg_ok "Stopped Vaultwarden" @@ -144,10 +143,6 @@ start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -memory 512 -pct set $CTID -cores 1 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8000${CL} \n" diff --git a/ct/vikunja.sh b/ct/vikunja.sh index b143816f..ed643699 100644 --- a/ct/vikunja.sh +++ b/ct/vikunja.sh @@ -56,11 +56,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/vikunja ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(curl -s https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Stopping ${APP}" diff --git a/ct/wastebin.sh b/ct/wastebin.sh index c13d0d9f..639e0cac 100644 --- a/ct/wastebin.sh +++ b/ct/wastebin.sh @@ -57,6 +57,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/wastebin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/watchyourlan.sh b/ct/watchyourlan.sh index 290ed72b..182a106f 100644 --- a/ct/watchyourlan.sh +++ b/ct/watchyourlan.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /lib/systemd/system/watchyourlan.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP" systemctl stop watchyourlan.service diff --git a/ct/wavelog.sh b/ct/wavelog.sh index d8d5afab..60ed3754 100644 --- a/ct/wavelog.sh +++ b/ct/wavelog.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/wavelog ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/wavelog/wavelog/releases/latest | grep "tag_name" | cut -d '"' -f 4) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 58313574..31c5813a 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /var/lib/whisparr ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/whoogle.sh b/ct/whoogle.sh index 9db69dee..a4375050 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /usr/local/bin/whoogle-search ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP} LXC" pip3 install whoogle-search --upgrade &>/dev/null diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 0fc854ed..bc9ddf90 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/wikijs ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Stopping ${APP}" systemctl stop wikijs diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 34adb6bd..d4388ad3 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -53,6 +53,9 @@ function default_settings() { } function update_script() { +header_info +check_container_storage +check_container_resources if [[ ! -d /etc/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi apt-get update apt-get -y upgrade diff --git a/ct/yunohost.sh b/ct/yunohost.sh index a8efa1d3..ce44c28e 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/apt/trusted.gpg.d/php.gpg ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/zabbix.sh b/ct/zabbix.sh index aa5eaef6..1a630011 100644 --- a/ct/zabbix.sh +++ b/ct/zabbix.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -f /etc/zabbix/zabbix_server.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index e78b5efe..70f1e758 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -55,6 +55,8 @@ function default_settings() { function update_script() { header_info + check_container_storage + check_container_resources if [[ ! -d /opt/zigbee2mqtt ]]; then msg_error "No ${APP} Installation Found!" exit diff --git a/ct/zipline.sh b/ct/zipline.sh index 28da39d9..8887bb99 100644 --- a/ct/zipline.sh +++ b/ct/zipline.sh @@ -54,11 +54,9 @@ function default_settings() { } function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/zipline ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then - read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt - [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit -fi RELEASE=$(curl -s https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Stopping ${APP}" diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 463e98dc..5fadef42 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/zoraxy/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 51c13092..8bb0624e 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -54,6 +54,8 @@ function default_settings() { function update_script() { header_info + check_container_storage + check_container_resources if [[ ! -d /opt/zwave-js-ui ]]; then msg_error "No ${APP} Installation Found!" exit