From a35dad5f1876f74523a64c08f0ed70422f457282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:39:30 +0100 Subject: [PATCH 01/22] Fix optional installs in Cockpit LXC (#317) --- ct/cockpit.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/ct/cockpit.sh b/ct/cockpit.sh index 4f195bce..167e766c 100644 --- a/ct/cockpit.sh +++ b/ct/cockpit.sh @@ -80,10 +80,9 @@ if [ "$UPD" == "2" ]; then apt-get install -y gawk &>/dev/null msg_ok "Installed dependencies" msg_info "Installing Cockpit file sharing" - LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-file-sharing/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - wget -q https://github.com/45Drives/cockpit-file-sharing/releases/download/v${LATEST}/cockpit-file-sharing_${LATEST}-1focal_all.deb - dpkg -i cockpit-file-sharing_${LATEST}-1focal_all.deb &>/dev/null - rm cockpit-file-sharing_${LATEST}-1focal_all.deb + wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-file-sharing/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4) + dpkg -i cockpit-file-sharing_*focal_all.deb &>/dev/null + rm cockpit-file-sharing_*focal_all.deb msg_ok "Installed Cockpit file sharing" exit fi @@ -94,10 +93,9 @@ if [ "$UPD" == "3" ]; then apt-get install -y samba-common-bin &>/dev/null msg_ok "Installed dependencies" msg_info "Installing Cockpit identities" - LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-identities/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - wget -q https://github.com/45Drives/cockpit-identities/releases/download/v${LATEST}/cockpit-identities_${LATEST}-1focal_all.deb - dpkg -i cockpit-identities_${LATEST}-1focal_all.deb &>/dev/null - rm cockpit-identities_${LATEST}-1focal_all.deb + wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-identities/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4) + dpkg -i cockpit-identities_*focal_all.deb &>/dev/null + rm cockpit-identities_*focal_all.deb msg_ok "Installed Cockpit identities" exit fi @@ -107,10 +105,9 @@ if [ "$UPD" == "4" ]; then apt-get install -y zip &>/dev/null msg_ok "Installed dependencies" msg_info "Installing Cockpit navigator" - LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-navigator/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - wget -q https://github.com/45Drives/cockpit-navigator/releases/download/v${LATEST}/cockpit-navigator_${LATEST}-1focal_all.deb - dpkg -i cockpit-navigator_${LATEST}-1focal_all.deb &>/dev/null - rm cockpit-navigator_${LATEST}-1focal_all.deb + wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-navigator/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4) + dpkg -i cockpit-navigator_*focal_all.deb &>/dev/null + rm cockpit-navigator_*focal_all.deb msg_ok "Installed Cockpit navigator" exit fi From d4ae7a9af0eb70cc8d2c529522ebf2baa6cf5728 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:14:56 +0100 Subject: [PATCH 02/22] Update CHANGELOG.md (#325) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 876587b3..e4d44554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,15 @@ All LXC instances created using this repository come pre-installed with Midnight Do not break established syntax in this file, as it is automatically updated by a Github Workflow + +## 2024-11-18 + +### Changed + +### 🚀 Updated Scripts + +- Fix optional installs in Cockpit LXC [@havardthom](https://github.com/havardthom) ([#317](https://github.com/community-scripts/ProxmoxVE/pull/317)) + ## 2024-11-17 ### Changed From b9e84543fc87f3f105263b4306d7fa7cca09fcad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:16:36 +0100 Subject: [PATCH 03/22] Verify changes before commit in changelog-pr.yml (#310) --- .github/workflows/changelog-pr.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 3c50a873..e99baba0 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -37,19 +37,6 @@ jobs: echo "LATEST_DATE=$LATEST_DATE" >> $GITHUB_ENV fi - - name: Check if CHANGELOG.md was modified - id: changelog-check - run: | - CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }}) - echo "Changed files: $CHANGED_FILES" - if echo "$CHANGED_FILES" | grep -q 'CHANGELOG.md'; then - echo "Changes detected in CHANGELOG.md, skipping additional checks." - echo "changelog_modified=true" >> $GITHUB_ENV - else - echo "No changes to CHANGELOG.md, continuing with protection checks." - echo "changelog_modified=false" >> $GITHUB_ENV - fi - - name: Get categorized pull requests id: get-categorized-prs uses: actions/github-script@v7 @@ -123,9 +110,14 @@ jobs: const newChangelogContent = changelogContent.replace(regex, newReleaseNotes) await fs.writeFile(changelogPath, newChangelogContent); - + + - name: Check if there are any changes + id: verify-diff + run: | + git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT - name: Commit and push changes to separate branch + if: steps.verify-diff.outputs.changed == 'true' run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" @@ -135,6 +127,7 @@ jobs: git push origin $BRANCH_NAME --force - name: Create pull request if not exists + if: steps.verify-diff.outputs.changed == 'true' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | From fb0706469b27dc72661aa1fd77a9bbb5eb6f00dd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:33:19 +0100 Subject: [PATCH 04/22] Linkwarden - Harmonize Script, Add Monolith & Bugfixing (#306) * Update linkwarden.sh Add new StorageCheck Harmonize Update Script Increase Ressources Correct check of version * Update linkwarden-install.sh Harmonize Script Switch from Git to Release Add Monolith Add Cargo * Tweak * Update linkwarden.json --- ct/linkwarden.sh | 28 ++++++++++++------ install/linkwarden-install.sh | 56 ++++++++++++++++++++++++----------- json/linkwarden.json | 10 +++---- 3 files changed, 63 insertions(+), 31 deletions(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index dd2f8ed7..7292d503 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -19,7 +19,7 @@ EOF header_info echo -e "Loading..." APP="Linkwarden" -var_disk="8" +var_disk="12" var_cpu="2" var_ram="2048" var_os="ubuntu" @@ -54,8 +54,9 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/linkwarden ]]; then msg_error "No ${APP} Installation Found!"; exit; fi - RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping ${APP}" @@ -63,20 +64,29 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP} msg_ok "Stopped ${APP}" msg_info "Updating ${APP} to ${RELEASE}" + cd /opt + mv /opt/linkwarden /opt/linkwarden_bak + 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 + mv linkwarden-${RELEASE:1} /opt/linkwarden cd /opt/linkwarden - git pull - yarn - npx playwright install-deps - yarn playwright install - yarn prisma generate - yarn build - yarn prisma migrate deploy + yarn &>/dev/null + npx playwright install-deps &>/dev/null + yarn playwright install &>/dev/null + cp /opt/linkwarden_bak/.env /opt/linkwarden/.env + yarn build &>/dev/null + yarn prisma migrate deploy &>/dev/null echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" msg_info "Starting ${APP}" systemctl start linkwarden msg_ok "Started ${APP}" + msg_info "Cleaning up" + rm -rf /opt/${RELEASE}.zip + rm -rf /opt/linkwarden_bak + msg_ok "Cleaned" msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}." diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index ccbda473..6067e174 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -2,6 +2,7 @@ # Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) +# Co-Author: MickLesk (Canbiz) # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -14,12 +15,13 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -$STD apt-get install -y gpg -$STD apt-get install -y postgresql +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + make \ + postgresql \ + cargo msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -34,22 +36,28 @@ $STD apt-get install -y nodejs $STD npm install -g yarn msg_ok "Installed Node.js/Yarn" -msg_info "Clone Linkwarden Repository" -$STD git clone https://github.com/linkwarden/linkwarden.git /opt/linkwarden -cd /opt/linkwarden -msg_ok "Cloned Linkwarden Repository" +msg_info "Installing Monolith" +$STD cargo install monolith +echo 'export PATH=~/.cargo/bin:$PATH' >>~/.bashrc +export PATH=~/.cargo/bin:$PATH +msg_ok "Installed Monolith" msg_info "Setting up PostgreSQL DB" DB_NAME=linkwardendb DB_USER=linkwarden DB_PASS="$(openssl rand -base64 18 | tr -d '/' | cut -c1-13)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" - -echo "" >>~/linkwarden.creds -echo -e "Linkwarden Database User: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds -echo -e "Linkwarden Database Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds -echo -e "Linkwarden Database Name: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';" +{ + echo "Linkwarden-Credentials" + echo "Linkwarden Database User: $DB_USER" + echo "Linkwarden Database Password: $DB_PASS" + echo "Linkwarden Database Name: $DB_NAME" + echo "Linkwarden Secret: $SECRET_KEY" +} >> ~/linkwarden.creds msg_ok "Set up PostgreSQL DB" read -r -p "Would you like to add Adminer? " prompt @@ -66,12 +74,24 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e "Adminer Username: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds echo -e "Adminer Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds echo -e "Adminer Database: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds + { + echo "" + echo "Adminer-Credentials" + echo "Adminer WebUI: $IP/adminer/" + echo "Adminer Database User: $DB_USER" + echo "Adminer Database Password: $DB_PASS" + echo "Adminer Database Name: $DB_NAME" +} >> ~/linkwarden.creds msg_ok "Installed Adminer" fi msg_info "Installing Linkwarden (Patience)" +cd /opt RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +wget -q "https://github.com/linkwarden/linkwarden/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv linkwarden-${RELEASE:1} /opt/linkwarden +cd /opt/linkwarden $STD yarn $STD npx playwright install-deps $STD yarn playwright install @@ -85,6 +105,7 @@ DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME} " >$env_path $STD yarn build $STD yarn prisma migrate deploy +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Linkwarden" msg_info "Creating Service" @@ -108,6 +129,7 @@ motd_ssh customize msg_info "Cleaning up" +rm -rf /opt/${RELEASE}.zip $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/json/linkwarden.json b/json/linkwarden.json index e6d24dc7..d621cb53 100644 --- a/json/linkwarden.json +++ b/json/linkwarden.json @@ -9,7 +9,7 @@ "updateable": false, "privileged": false, "interface_port": "3000", - "documentation": null, + "documentation": "https://docs.linkwarden.app/", "website": "https://linkwarden.app/", "logo": "https://raw.githubusercontent.com/linkwarden/linkwarden/main/assets/logo.png", "description": "Linkwarden is a fully self-hostable, open-source collaborative bookmark manager to collect, organize and archive webpages.", @@ -20,7 +20,7 @@ "resources": { "cpu": "2", "ram": "2048", - "hdd": "8", + "hdd": "12", "os": "ubuntu", "version": "22.04" } @@ -32,8 +32,8 @@ }, "notes": [ { - "text": "Show Database/Adminer Credentials: `cat linkwarden.creds`", - "type": "warning" + "text": "Linkwarden > 2.8.2 needs Monolith, More info: `https://github.com/community-scripts/ProxmoxVE/discussions/305`", + "type": "info" } ] -} \ No newline at end of file +} From a3ff42b122d2909e28648d19c6342ed9b02d89a9 Mon Sep 17 00:00:00 2001 From: anishp55 Date: Mon, 18 Nov 2024 09:46:00 -0500 Subject: [PATCH 05/22] detect sse 4.2 (#328) see if sse 4.2 is on the processor, if so add openvino. --- install/frigate-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/frigate-install.sh b/install/frigate-install.sh index b830cf58..3eda5afd 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -104,8 +104,8 @@ fi echo "tmpfs /tmp/cache tmpfs defaults 0 0" >> /etc/fstab msg_ok "Installed Frigate $RELEASE" -if grep -q -o -m1 'avx[^ ]*' /proc/cpuinfo; then - msg_ok "AVX Support Detected" +if grep -q -o -m1 -E 'avx[^ ]* | sse4_2' /proc/cpuinfo; then + msg_ok "AVX or SSE 4.2 Support Detected" msg_info "Installing Openvino Object Detection Model (Resilience)" $STD pip install -r /opt/frigate/docker/main/requirements-ov.txt cd /opt/frigate/models From b794a48f83b9fa0ce8462aa5a39070f8e0f20329 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:44:53 +0100 Subject: [PATCH 06/22] Bugfix: Wallos Patch (Cron Log & Media Backup) (#331) * Update wallos.sh * Update wallos.sh * Update wallos-install.sh * Remove Empty Line --- ct/wallos.sh | 9 +++++---- install/wallos-install.sh | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ct/wallos.sh b/ct/wallos.sh index 4b2e94a0..36a6e2de 100644 --- a/ct/wallos.sh +++ b/ct/wallos.sh @@ -55,24 +55,25 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/wallos ]]; 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/ellite/Wallos/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 "Updating ${APP} to ${RELEASE}" cd /opt wget -q "https://github.com/ellite/Wallos/archive/refs/tags/v${RELEASE}.zip" mv /opt/wallos/db/wallos.db /opt/wallos.db + mv /opt/wallos/images/uploads /opt/images/uploads unzip -q v${RELEASE}.zip rm -rf /opt/wallos mv Wallos-${RELEASE} /opt/wallos rm -rf /opt/wallos/db/wallos.empty.db mv /opt/wallos.db /opt/wallos/db/wallos.db + mv /opt/images/uploads /opt/wallos/images/uploads chown -R www-data:www-data /opt/wallos chmod -R 755 /opt/wallos + mkdir -p /var/log/cron curl http://localhost/endpoints/db/migrate.php &>/dev/null echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" diff --git a/install/wallos-install.sh b/install/wallos-install.sh index c1f52295..5d62870e 100644 --- a/install/wallos-install.sh +++ b/install/wallos-install.sh @@ -59,6 +59,7 @@ $STD curl http://localhost/endpoints/db/migrate.php msg_ok "Installed Wallos" msg_info "Setting up Crontabs" +mkdir -p /var/log/cron cat < /opt/wallos.cron 0 1 * * * php /opt/wallos/endpoints/cronjobs/updatenextpayment.php >> /var/log/cron/updatenextpayment.log 2>&1 0 2 * * * php /opt/wallos/endpoints/cronjobs/updateexchange.php >> /var/log/cron/updateexchange.log 2>&1 @@ -78,4 +79,4 @@ msg_info "Cleaning up" rm -rf /opt/v${RELEASE}.zip $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From d84cf6ef0e9cd555e6bb17bdf08f9aea21cff89f Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 19 Nov 2024 05:46:04 +1300 Subject: [PATCH 07/22] Added additional instructions to nginxproxymanager (#329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added additional instructions to nginxproxymanager * Update json/nginxproxymanager.json --------- Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --- json/nginxproxymanager.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/nginxproxymanager.json b/json/nginxproxymanager.json index 5897e512..98c9565b 100644 --- a/json/nginxproxymanager.json +++ b/json/nginxproxymanager.json @@ -32,8 +32,8 @@ }, "notes": [ { - "text": "Since there are hundreds of Certbot instances, it's necessary to install the specific Certbot of your preference.", + "text": "Since there are hundreds of Certbot instances, it's necessary to install the specific Certbot of your preference. Running `/app/scripts/install-certbot-plugins` within the nginxproxymanager LXC shell will install many additional plugins.", "type": "warning" } ] -} \ No newline at end of file +} 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 08/22] 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 From 0067a2e5f670acde265e4952ef6827e58d1031d5 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:35:51 +0100 Subject: [PATCH 09/22] new scripts for NetBox (#308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * new scripts for NetBox * Update json/netbox.json Co-Authored-By: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Fixed issues after pr --------- Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --- ct/netbox.sh | 114 ++++++++++++++++++++++++++++++++++++ install/netbox-install.sh | 119 ++++++++++++++++++++++++++++++++++++++ json/netbox.json | 39 +++++++++++++ 3 files changed, 272 insertions(+) create mode 100644 ct/netbox.sh create mode 100644 install/netbox-install.sh create mode 100644 json/netbox.json diff --git a/ct/netbox.sh b/ct/netbox.sh new file mode 100644 index 00000000..f2b13b9d --- /dev/null +++ b/ct/netbox.sh @@ -0,0 +1,114 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2024 community-scripts ORG +# Author: bvdberg01 +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ __ ____ + / | / /__ / /_/ __ )____ _ __ + / |/ / _ \/ __/ __ / __ \| |/_/ + / /| / __/ /_/ /_/ / /_/ /> < +/_/ |_/\___/\__/_____/\____/_/|_| + +EOF +} +header_info +echo -e "Loading..." +APP="NetBox" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +check_container_storage +check_container_resources +if [[ ! -f /etc/systemd/system/netbox.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + +RELEASE=$(curl -s https://api.github.com/repos/netbox-community/netbox/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}" + systemctl stop netbox netbox-rq + msg_ok "Stopped ${APP}" + + msg_info "Updating $APP to v${RELEASE}" + mv /opt/netbox/ /opt/netbox-backup + cd /opt + wget -q "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip" + unzip -q "v${RELEASE}.zip" + mv /opt/netbox-${RELEASE}/ /opt/netbox/ + + cp -r /opt/netbox-backup/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/ + cp -r /opt/netbox-backup/netbox/media/ /opt/netbox/netbox/ + cp -r /opt/netbox-backup/netbox/scripts /opt/netbox/netbox/ + cp -r /opt/netbox-backup/netbox/reports /opt/netbox/netbox/ + cp -r /opt/netbox-backup/gunicorn.py /opt/netbox/ + + if [ -f /opt/netbox-backup/local_requirements.txt ]; then + cp -r /opt/netbox-backup/local_requirements.txt /opt/netbox/ + fi + + if [ -f /opt/netbox-backup/netbox/netbox/ldap_config.py ]; then + cp -r /opt/netbox-backup/netbox/netbox/ldap_config.py /opt/netbox/netbox/netbox/ + fi + + /opt/netbox/upgrade.sh &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting ${APP}" + systemctl start netbox netbox-rq + msg_ok "Started ${APP}" + + msg_info "Cleaning up" + rm -r "/opt/v${RELEASE}.zip" + rm -r /opt/netbox-backup + msg_ok "Cleaned" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at v${RELEASE}" +fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}https://${IP}${CL} \n" diff --git a/install/netbox-install.sh b/install/netbox-install.sh new file mode 100644 index 00000000..81a71832 --- /dev/null +++ b/install/netbox-install.sh @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 community-scripts ORG +# Author: bvdberg01 +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + apache2 \ + redis-server \ + postgresql \ + python3 \ + python3-pip \ + python3-venv \ + python3-dev \ + build-essential \ + libxml2-dev \ + libxslt1-dev \ + libffi-dev \ + libpq-dev \ + libssl-dev \ + zlib1g-dev +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL" +DB_NAME=netbox +DB_USER=netbox +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" +{ +echo "Netbox-Credentials" +echo -e "Netbox Database User: \e[32m$DB_USER\e[0m" +echo -e "Netbox Database Password: \e[32m$DB_PASS\e[0m" +echo -e "Netbox Database Name: \e[32m$DB_NAME\e[0m" +} >> ~/netbox.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing NetBox (Patience)" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/netbox-community/netbox/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip" +unzip -q "v${RELEASE}.zip" +mv /opt/netbox-${RELEASE}/ /opt/netbox + +$STD adduser --system --group netbox +chown --recursive netbox /opt/netbox/netbox/media/ +chown --recursive netbox /opt/netbox/netbox/reports/ +chown --recursive netbox /opt/netbox/netbox/scripts/ + +mv /opt/netbox/netbox/netbox/configuration_example.py /opt/netbox/netbox/netbox/configuration.py + +SECRET_KEY=$(python3 /opt/netbox/netbox/generate_secret_key.py) +ESCAPED_SECRET_KEY=$(printf '%s\n' "$SECRET_KEY" | sed 's/[&/\]/\\&/g') + +sed -i 's/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = ["*"]/' /opt/netbox/netbox/netbox/configuration.py +sed -i "s|SECRET_KEY = ''|SECRET_KEY = '${ESCAPED_SECRET_KEY}'|" /opt/netbox/netbox/netbox/configuration.py +sed -i "/DATABASE = {/,/}/s/'USER': '[^']*'/'USER': '$DB_USER'/" /opt/netbox/netbox/netbox/configuration.py +sed -i "/DATABASE = {/,/}/s/'PASSWORD': '[^']*'/'PASSWORD': '$DB_PASS'/" /opt/netbox/netbox/netbox/configuration.py + +$STD /opt/netbox/upgrade.sh +ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping + +mv /opt/netbox/contrib/apache.conf /etc/apache2/sites-available/netbox.conf +$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/netbox.key -out /etc/ssl/certs/netbox.crt -subj "/C=US/O=NetBox/OU=Certificate/CN=localhost" +$STD a2enmod ssl proxy proxy_http headers rewrite +$STD a2ensite netbox +systemctl restart apache2 + +mv /opt/netbox/contrib/gunicorn.py /opt/netbox/gunicorn.py +mv /opt/netbox/contrib/*.service /etc/systemd/system/ +systemctl daemon-reload +systemctl enable -q --now netbox netbox-rq + +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +echo -e "Netbox Secret: \e[32m$SECRET_KEY\e[0m" >> ~/netbox.creds +msg_ok "Installed NetBox" + +msg_info "Setting up Django Admin" +DJANGO_USER=Admin +DJANGO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) + +source /opt/netbox/venv/bin/activate +$STD python3 /opt/netbox/netbox/manage.py shell << EOF +from django.contrib.auth import get_user_model +UserModel = get_user_model() +user = UserModel.objects.create_user('$DJANGO_USER', password='$DJANGO_PASS') +user.is_superuser = True +user.is_staff = True +user.save() +EOF +{ +echo "" +echo "Netbox-Django-Credentials" +echo -e "Django User: \e[32m$DJANGO_USER\e[0m" +echo -e "Django Password: \e[32m$DJANGO_PASS\e[0m" +} >> ~/netbox.creds +msg_ok "Setup Django Admin" + +motd_ssh +customize + +msg_info "Cleaning up" +rm "/opt/v${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/netbox.json b/json/netbox.json new file mode 100644 index 00000000..adb1c1f9 --- /dev/null +++ b/json/netbox.json @@ -0,0 +1,39 @@ +{ + "name": "NetBox", + "slug": "netbox", + "categories": [ + 11 + ], + "date_created": "2024-11-17", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": "443", + "documentation": "https://netboxlabs.com/docs/netbox/en/stable/", + "website": "https://netboxlabs.com/", + "logo": "https://github.com/netbox-community/netbox/wiki/images/logos/netbox_icon.svg", + "description": "NetBox is the source of truth for everything on your network, from physical components like power systems and cabling to virtual assets like IP addresses and VLANs. Network automation and observability tools depend on NetBox’s authoritative data to roll out configurations, monitor changes, and accelerate operations across the enterprise", + "install_methods": [ + { + "type": "default", + "script": "ct/netbox.sh", + "resources": { + "cpu": "2", + "ram": "2048", + "hdd": "4", + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Show login and database credentials: `cat netbox.creds`", + "type": "info" + } + ] +} \ No newline at end of file From 42785dbbc8553575da7da35e622a487a056c7de0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:43:03 +0100 Subject: [PATCH 10/22] Update CHANGELOG.md (#327) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4d44554..11ade1e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,10 +22,29 @@ Do not break established syntax in this file, as it is automatically updated by ### Changed +### 💥 Breaking Changes + +- Massive Update - Remove old storage check, add new storage and resource check to all scripts - Remove downscaling with pct set [@MickLesk](https://github.com/MickLesk) ([#333](https://github.com/community-scripts/ProxmoxVE/pull/333)) + +### ✨ New Scripts + +- new scripts for NetBox [@bvdberg01](https://github.com/bvdberg01) ([#308](https://github.com/community-scripts/ProxmoxVE/pull/308)) + ### 🚀 Updated Scripts +- Support SSE 4.2 in Frigate script [@anishp55](https://github.com/anishp55) ([#328](https://github.com/community-scripts/ProxmoxVE/pull/328)) +- Bugfix: Wallos Patch (Cron Log & Media Backup) [@MickLesk](https://github.com/MickLesk) ([#331](https://github.com/community-scripts/ProxmoxVE/pull/331)) +- Linkwarden - Harmonize Script, Add Monolith & Bugfixing [@MickLesk](https://github.com/MickLesk) ([#306](https://github.com/community-scripts/ProxmoxVE/pull/306)) - Fix optional installs in Cockpit LXC [@havardthom](https://github.com/havardthom) ([#317](https://github.com/community-scripts/ProxmoxVE/pull/317)) +### 🌐 Website + +- Added additional instructions to nginxproxymanager [@newzealandpaul](https://github.com/newzealandpaul) ([#329](https://github.com/community-scripts/ProxmoxVE/pull/329)) + +### 🧰 Maintenance + +- Verify changes before commit in changelog-pr.yml [@havardthom](https://github.com/havardthom) ([#310](https://github.com/community-scripts/ProxmoxVE/pull/310)) + ## 2024-11-17 ### Changed From 82d287959e66236d641efec328451863a039c312 Mon Sep 17 00:00:00 2001 From: Erfan Samandarian <160413250+erfansamandarian@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:23:45 +1100 Subject: [PATCH 11/22] Fix: add gnupg to installed dependencies (#349) --- install/linkwarden-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 6067e174..8905eb41 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -21,7 +21,8 @@ $STD apt-get install -y \ mc \ make \ postgresql \ - cargo + cargo \ + gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" From 3b29f085907f0c4a84f122abeb604387ec462fb6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 19 Nov 2024 07:24:00 +0100 Subject: [PATCH 12/22] Fix Wallos Update (#339) * (Maintenance) Optimize DB Check Wallos Check if wallos.db exists * Switch mkdir * switch to logos * Update wallos.sh --- ct/wallos.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ct/wallos.sh b/ct/wallos.sh index 36a6e2de..f8f9d352 100644 --- a/ct/wallos.sh +++ b/ct/wallos.sh @@ -63,14 +63,15 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v msg_info "Updating ${APP} to ${RELEASE}" cd /opt wget -q "https://github.com/ellite/Wallos/archive/refs/tags/v${RELEASE}.zip" + mkdir -p /opt/logos mv /opt/wallos/db/wallos.db /opt/wallos.db - mv /opt/wallos/images/uploads /opt/images/uploads + mv /opt/wallos/images/uploads/logos /opt/logos/ unzip -q v${RELEASE}.zip rm -rf /opt/wallos mv Wallos-${RELEASE} /opt/wallos rm -rf /opt/wallos/db/wallos.empty.db mv /opt/wallos.db /opt/wallos/db/wallos.db - mv /opt/images/uploads /opt/wallos/images/uploads + mv /opt/logos/* /opt/wallos/images/uploads/logos chown -R www-data:www-data /opt/wallos chmod -R 755 /opt/wallos mkdir -p /var/log/cron From ba965758db2cc63fa2af627dfdbce59bbc1ffee3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 07:28:53 +0100 Subject: [PATCH 13/22] Update CHANGELOG.md (#344) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ade1e2..7167e266 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,16 @@ Do not break established syntax in this file, as it is automatically updated by + +## 2024-11-19 + +### Changed + +### 🚀 Updated Scripts + +- Fix Wallos Update [@MickLesk](https://github.com/MickLesk) ([#339](https://github.com/community-scripts/ProxmoxVE/pull/339)) +- Fix: add gnupg to installed dependencies [@erfansamandarian](https://github.com/erfansamandarian) ([#349](https://github.com/community-scripts/ProxmoxVE/pull/349)) + ## 2024-11-18 ### Changed From 7192b0f8dd20adbb5968b43a3d1bd3f74458afaf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 07:29:44 +0100 Subject: [PATCH 14/22] Update CHANGELOG.md (#351) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7167e266..fcfbc96e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,8 +25,8 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Linkwarden: add gnupg to installed dependencies [@erfansamandarian](https://github.com/erfansamandarian) ([#349](https://github.com/community-scripts/ProxmoxVE/pull/349)) - Fix Wallos Update [@MickLesk](https://github.com/MickLesk) ([#339](https://github.com/community-scripts/ProxmoxVE/pull/339)) -- Fix: add gnupg to installed dependencies [@erfansamandarian](https://github.com/erfansamandarian) ([#349](https://github.com/community-scripts/ProxmoxVE/pull/349)) ## 2024-11-18 From 497819f11231ebf31b120f156c8b0a2f85fc770e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:50:15 +0100 Subject: [PATCH 15/22] Update FUNDING.yml (#352) --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 8ecf7b04..5f1f1972 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -ko_fi: proxmoxhelperscripts +ko_fi: community_scripts From 1b8089ff2b60e89bd4d04b454d91bce754ffdc70 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:50:27 +0100 Subject: [PATCH 16/22] move secret key up (#356) --- install/linkwarden-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 8905eb41..97828933 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -47,6 +47,7 @@ msg_info "Setting up PostgreSQL DB" DB_NAME=linkwardendb DB_USER=linkwarden DB_PASS="$(openssl rand -base64 18 | tr -d '/' | cut -c1-13)" +SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" @@ -97,7 +98,6 @@ $STD yarn $STD npx playwright install-deps $STD yarn playwright install IP=$(hostname -I | awk '{print $1}') -SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" env_path="/opt/linkwarden/.env" echo " NEXTAUTH_SECRET=${SECRET_KEY} From fc75c6657b5163530aa956d5bbdeae50c0416966 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:51:21 +0100 Subject: [PATCH 17/22] Update CHANGELOG.md (#357) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcfbc96e..24885afe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,9 +25,14 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Linkwarden: Move Secret Key above in install.sh [@MickLesk](https://github.com/MickLesk) ([#356](https://github.com/community-scripts/ProxmoxVE/pull/356)) - Linkwarden: add gnupg to installed dependencies [@erfansamandarian](https://github.com/erfansamandarian) ([#349](https://github.com/community-scripts/ProxmoxVE/pull/349)) - Fix Wallos Update [@MickLesk](https://github.com/MickLesk) ([#339](https://github.com/community-scripts/ProxmoxVE/pull/339)) +### 🧰 Maintenance + +- [chore] Update FUNDING.yml [@MickLesk](https://github.com/MickLesk) ([#352](https://github.com/community-scripts/ProxmoxVE/pull/352)) + ## 2024-11-18 ### Changed From 9148ea1dff8082157298327e7e887f56dcfacb1e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:04:39 +0100 Subject: [PATCH 18/22] [github]: add new Frontend_Report / Issue_Report & optimize config.yml (#226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add new Frontend_Report / Issue_Report & optimize config.yml * Update .github/ISSUE_TEMPLATE/bug_report.yml switch general to other Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/bug_report.yml remove title Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/bug_report.yml remove label Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/config.yml update text for questions and help Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/config.yml harmonize with readme (discord) Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/frontend_report.yml harmonize title for Frontend Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * remove documentation issue * Update .github/ISSUE_TEMPLATE/config.yml harmonize text Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/frontend_report.yml update label Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Update .github/ISSUE_TEMPLATE/frontend_report.yml remove title Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> * Harmonize Frontend > Website * remove "frontend" word * Add "Other" to Frontend-Report --------- Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com> --- .../{script-issue.yaml => bug_report.yml} | 34 +++++---- .github/ISSUE_TEMPLATE/config.yml | 12 ++- .github/ISSUE_TEMPLATE/frontend_report.yml | 75 +++++++++++++++++++ .github/ISSUE_TEMPLATE/website-issue.yaml | 45 ----------- 4 files changed, 104 insertions(+), 62 deletions(-) rename .github/ISSUE_TEMPLATE/{script-issue.yaml => bug_report.yml} (72%) create mode 100644 .github/ISSUE_TEMPLATE/frontend_report.yml delete mode 100644 .github/ISSUE_TEMPLATE/website-issue.yaml diff --git a/.github/ISSUE_TEMPLATE/script-issue.yaml b/.github/ISSUE_TEMPLATE/bug_report.yml similarity index 72% rename from .github/ISSUE_TEMPLATE/script-issue.yaml rename to .github/ISSUE_TEMPLATE/bug_report.yml index b8e83878..54a11f33 100644 --- a/.github/ISSUE_TEMPLATE/script-issue.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,6 @@ -name: Problems with a script -description: Generate a report on an issue pertaining specifically to a script. For other inquires please share them in the Discussions section. +name: "🐞 Script Issue Report" +description: Report a specific issue with a script. For other inquiries, please use the Discussions section. + body: - type: markdown attributes: @@ -8,37 +9,38 @@ body: - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. - If the default Linux distribution is not adhered to, script support will be discontinued. - When encountering the error message `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue. - - For suggestions, questions or feature/script requests, please share them in the [Discussions section.](https://github.com/community-scripts/ProxmoxVE/discussions) + - For suggestions, questions, or feature/script requests, please use the [Discussions section.](https://github.com/community-scripts/ProxmoxVE/discussions) + - type: input id: guidelines attributes: label: Please verify that you have read and understood the guidelines. - placeholder: 'yes' + placeholder: "yes" validations: required: true + - type: textarea id: bug attributes: label: A clear and concise description of the issue. validations: required: true - - type: dropdown - id: settings + + - type: checkboxes validations: required: true attributes: label: What settings are you currently utilizing? options: - - - - Default Settings - - Advanced Settings + - label: Default Settings + - label: Advanced Settings + - type: markdown attributes: - value: (if Advanced Settings, please try Default Settings before creating an issue) + value: "If using Advanced Settings, please try Default Settings before creating an issue." + - type: dropdown id: distribution - validations: - required: true attributes: label: Which Linux distribution are you employing? options: @@ -49,17 +51,21 @@ body: - Ubuntu 20.04 - Ubuntu 22.04 - Ubuntu 24.04 + validations: + required: true + - type: textarea id: screenshot attributes: label: If relevant, including screenshots or a code block can be helpful in clarifying the issue. - placeholder: Code blocks begin and conclude by enclosing the code with three backticks (```) above and below it. + placeholder: "Code blocks begin and conclude by enclosing the code with three backticks (```) above and below it." validations: required: false + - type: textarea id: reproduce attributes: label: Please provide detailed steps to reproduce the issue. - placeholder: First do this, then this ... + placeholder: "First do this, then this ..." validations: required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 5adde47d..e9a13bc4 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,11 @@ blank_issues_enabled: false contact_links: - - name: Helper-Scripts Community Support - url: https://github.com/community-scripts/ProxmoxVE/discussions - about: Please ask and answer questions here. + - name: 🤔 Questions and Help + url: https://github.com/community-scripts/ProxmoxVE/discussions + about: For suggestions or questions, please use the Discussions section. + - name: 🌟 Feature request + url: https://github.com/community-scripts/ProxmoxVE/discussions/new?category=request-script + about: For feature/script requests, please use the Discussions section. + - name: 💻 Discord + url: https://discord.gg/UHrpNWGwkH + about: Join our Discord server to chat with other users in the Proxmox Helper Scripts community. diff --git a/.github/ISSUE_TEMPLATE/frontend_report.yml b/.github/ISSUE_TEMPLATE/frontend_report.yml new file mode 100644 index 00000000..2a6f20af --- /dev/null +++ b/.github/ISSUE_TEMPLATE/frontend_report.yml @@ -0,0 +1,75 @@ +name: "🌐 Website Issue Report" +description: Report an issue, an optimization request or an documentation issue specifically related to the website. +labels: "website" + +body: + - type: markdown + attributes: + value: | + **IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure. + - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. + - If the problem is related to a bug in the website, kindly check for browser compatibility and ensure the issue occurs in multiple browsers before submitting. + - For suggestions, questions, or feature requests, please use the [Discussions section.](https://github.com/community-scripts/ProxmoxVE/discussions) + + - type: input + id: guidelines + attributes: + label: Please verify that you have read and understood the guidelines. + placeholder: 'yes' + validations: + required: true + + - type: dropdown + id: issue_type + validations: + required: true + attributes: + label: What type of issue is this? + options: + - + - Bug + - Optimization + - Documentation + - Other + + - type: textarea + id: bug_description + attributes: + label: A clear and concise description of the issue. + validations: + required: true + + - type: dropdown + id: browser + validations: + required: true + attributes: + label: Which browser are you using? + options: + - + - Chrome + - Firefox + - Safari + - Edge + - Other + + - type: markdown + attributes: + value: | + **If the issue is browser-related**, please provide information on the version and platform (Windows, MacOS, Linux, etc.). + + - type: textarea + id: screenshot + attributes: + label: If relevant, including screenshots or a code block can be helpful in clarifying the issue. + placeholder: "Code blocks begin and conclude by enclosing the code with three backticks (```) above and below it." + validations: + required: false + + - type: textarea + id: reproduce + attributes: + label: Please provide detailed steps to reproduce the issue. + placeholder: "First do this, then this ..." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/website-issue.yaml b/.github/ISSUE_TEMPLATE/website-issue.yaml deleted file mode 100644 index abfa19f4..00000000 --- a/.github/ISSUE_TEMPLATE/website-issue.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: Problems with the website -description: Generate a report on an issue pertaining specifically to the website (https://community-scripts.github.io/ProxmoxVE/). For other inquires please share them in the Discussions section. -labels: ["website"] -body: - - type: markdown - attributes: - value: | - **IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure. - - Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one. - - For suggestions, questions or feature/script requests, please share them in the [Discussions section.](https://github.com/community-scripts/ProxmoxVE/discussions) - - type: input - id: guidelines - attributes: - label: Please verify that you have read and understood the guidelines. - placeholder: 'yes' - validations: - required: true - - type: textarea - id: bug - attributes: - label: A clear and concise description of the issue. - validations: - required: true - - type: textarea - id: expected-behavior - attributes: - label: Please provide a description of the expected behavior. - validations: - required: true - - type: textarea - id: screenshot - attributes: - label: If relevant, including screenshots or a code block can be helpful in clarifying the issue. - placeholder: Code blocks begin and conclude by enclosing the code with three backticks (```) above and below it. - validations: - required: false - - type: textarea - id: reproduce - attributes: - label: Please provide detailed steps to reproduce the issue. - placeholder: First do this, then this ... - validations: - required: false - - From 9f80cec2d987495cca321b9cccbaf91160352326 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:18:15 +0100 Subject: [PATCH 19/22] Update CHANGELOG.md (#369) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24885afe..0bdaa1b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🧰 Maintenance +- [github]: add new Frontend_Report / Issue_Report & optimize config.yml [@MickLesk](https://github.com/MickLesk) ([#226](https://github.com/community-scripts/ProxmoxVE/pull/226)) - [chore] Update FUNDING.yml [@MickLesk](https://github.com/MickLesk) ([#352](https://github.com/community-scripts/ProxmoxVE/pull/352)) ## 2024-11-18 From 6e71047570dc0c4a5c60bd1711af3be2e949236c Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:21:00 +0100 Subject: [PATCH 20/22] Refactor Buttons component to use a ButtonLink for cleaner code, simplifying the source URL generation and layout (#371) * Refactor Buttons component to use a ButtonLink for cleaner code, simplifying the source URL generation and layout * Refactor DefaultPassword component to simplify credential handling and enhance code readability with map function * Refactor DefaultSettings component to improve resource display logic and enhance readability using a new ResourceDisplay subcomponent --- .../_components/ScriptItems/Buttons.tsx | 76 ++++++++++--------- .../ScriptItems/DefaultPassword.tsx | 76 ++++++++----------- .../ScriptItems/DefaultSettings.tsx | 70 ++++++++--------- 3 files changed, 104 insertions(+), 118 deletions(-) diff --git a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx index 00a66782..cb46e437 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx @@ -5,45 +5,53 @@ import { BookOpenText, Code, Globe } from "lucide-react"; import Link from "next/link"; const generateSourceUrl = (slug: string, type: string) => { - if (type === "ct") { - return `https://raw.githubusercontent.com/community-scripts/${basePath}/main/install/${slug}-install.sh`; - } else { - return `https://raw.githubusercontent.com/community-scripts/${basePath}/main/${type}/${slug}.sh`; - } + const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; + return type === "ct" + ? `${baseUrl}/install/${slug}-install.sh` + : `${baseUrl}/${type}/${slug}.sh`; }; +interface ButtonLinkProps { + href: string; + icon: React.ReactNode; + text: string; +} + +const ButtonLink = ({ href, icon, text }: ButtonLinkProps) => ( + +); + export default function Buttons({ item }: { item: Script }) { + const buttons = [ + item.website && { + href: item.website, + icon: , + text: "Website", + }, + item.documentation && { + href: item.documentation, + icon: , + text: "Documentation", + }, + { + href: generateSourceUrl(item.slug, item.type), + icon: , + text: "Source Code", + }, + ].filter(Boolean) as ButtonLinkProps[]; + return (
- {item.website && ( - - )} - {item.documentation && ( - - )} - { - - } + {buttons.map((props, index) => ( + + ))}
); } diff --git a/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx b/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx index 4bd555a1..15a96231 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx @@ -4,55 +4,39 @@ import { Separator } from "@/components/ui/separator"; import { Script } from "@/lib/types"; export default function DefaultPassword({ item }: { item: Script }) { - const hasDefaultLogin = - item.default_credentials.username && item.default_credentials.password; + const { username, password } = item.default_credentials; + const hasDefaultLogin = username && password; + + if (!hasDefaultLogin) return null; + + const copyCredential = (type: "username" | "password") => { + handleCopy(type, item.default_credentials[type] ?? ""); + }; return ( -
- {hasDefaultLogin && ( -
-
-

Default Login Credentials

+
+
+

Default Login Credentials

+
+ +
+

+ You can use the following credentials to login to the {item.name}{" "} + {item.type}. +

+ {["username", "password"].map((type) => ( +
+ {type.charAt(0).toUpperCase() + type.slice(1)}:{" "} +
- -
-

- You can use the following credentials to login to the {""} - {item.name} {item.type}. -

-
- Username:{" "} - -
-
- Password:{" "} - -
-
-
- )} + ))} +
); } diff --git a/frontend/src/app/scripts/_components/ScriptItems/DefaultSettings.tsx b/frontend/src/app/scripts/_components/ScriptItems/DefaultSettings.tsx index 1c7d89c7..bfa61759 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/DefaultSettings.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/DefaultSettings.tsx @@ -1,56 +1,50 @@ import { Script } from "@/lib/types"; export default function DefaultSettings({ item }: { item: Script }) { + const getDisplayValueFromRAM = (ram: number) => + ram >= 1024 ? `${Math.floor(ram / 1024)}GB` : `${ram}MB`; + + const ResourceDisplay = ({ + settings, + title, + }: { + settings: (typeof item.install_methods)[0]; + title: string; + }) => { + const { cpu, ram, hdd } = settings.resources; + return ( +
+

{title}

+

CPU: {cpu}vCPU

+

+ RAM: {getDisplayValueFromRAM(ram ?? 0)} +

+

HDD: {hdd}GB

+
+ ); + }; + const defaultSettings = item.install_methods.find( (method) => method.type === "default", ); - - const defaultSettingsAvailable = - defaultSettings?.resources.cpu || - defaultSettings?.resources.ram || - defaultSettings?.resources.hdd; - const defaultAlpineSettings = item.install_methods.find( (method) => method.type === "alpine", ); - const getDisplayValueFromRAM = (ram: number) => { - if (ram >= 1024) { - return (ram / 1024).toFixed(0) + "GB"; - } - return ram + "MB"; - }; + const hasDefaultSettings = + defaultSettings?.resources && + Object.values(defaultSettings.resources).some(Boolean); return ( <> - {defaultSettingsAvailable && ( -
-

Default settings

-

- CPU: {defaultSettings?.resources.cpu}vCPU -

-

- RAM: {getDisplayValueFromRAM(defaultSettings?.resources.ram ?? 0)} -

-

- HDD: {defaultSettings?.resources.hdd}GB -

-
+ {hasDefaultSettings && ( + )} {defaultAlpineSettings && ( -
-

Default Alpine settings

-

- CPU: {defaultAlpineSettings?.resources.cpu}vCPU -

-

- RAM:{" "} - {getDisplayValueFromRAM(defaultAlpineSettings?.resources.ram ?? 0)} -

-

- HDD: {defaultAlpineSettings?.resources.hdd}GB -

-
+ )} ); From 06fd1aee26759747c0cdab9fa57fbdfd9084ca13 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:26:46 +0100 Subject: [PATCH 21/22] Add *Arr Suite category for Website (#370) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update metadata.json * add bazarr to category 18 * add lidarr to category 18 * add notifarr to category 18 * add prowlarr to category 18 * add radarr to category 18 * add readarr to category 18 * add recyclarr to category 18 * add sonarr to category 18 * add tdarr to category 18 * add whisparr to category 18 * add homarr to category 18 * add category 18 to autobrr * change sort order --------- Co-authored-by: Håvard Thom --- json/autobrr.json | 2 +- json/bazarr.json | 4 ++-- json/homarr.json | 4 ++-- json/lidarr.json | 4 ++-- json/metadata.json | 31 ++++++++++++++++--------------- json/notifiarr.json | 4 ++-- json/prowlarr.json | 4 ++-- json/radarr.json | 4 ++-- json/readarr.json | 4 ++-- json/recyclarr.json | 4 ++-- json/sonarr.json | 4 ++-- json/tdarr.json | 4 ++-- json/whisparr.json | 4 ++-- 13 files changed, 39 insertions(+), 38 deletions(-) diff --git a/json/autobrr.json b/json/autobrr.json index 8bc12584..35b4368f 100644 --- a/json/autobrr.json +++ b/json/autobrr.json @@ -2,7 +2,7 @@ "name": "Autobrr", "slug": "autobrr", "categories": [ - 16 + 18 ], "date_created": "2024-05-02", "type": "ct", diff --git a/json/bazarr.json b/json/bazarr.json index c909a792..59a9375b 100644 --- a/json/bazarr.json +++ b/json/bazarr.json @@ -2,7 +2,7 @@ "name": "Bazarr", "slug": "bazarr", "categories": [ - 12 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/json/homarr.json b/json/homarr.json index 4f5094b8..208f7abc 100644 --- a/json/homarr.json +++ b/json/homarr.json @@ -2,7 +2,7 @@ "name": "Homarr", "slug": "homarr", "categories": [ - 15 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/json/lidarr.json b/json/lidarr.json index 81c52703..0c6519c5 100644 --- a/json/lidarr.json +++ b/json/lidarr.json @@ -2,7 +2,7 @@ "name": "Lidarr", "slug": "lidarr", "categories": [ - 12 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/json/metadata.json b/json/metadata.json index cc2431b8..02b7db5e 100644 --- a/json/metadata.json +++ b/json/metadata.json @@ -3,21 +3,22 @@ [ {"name": "Proxmox VE Tools", "id": 1, "sort_order": 1.0}, {"name": "AdBlocker - DNS", "id": 13, "sort_order": 2.0}, - {"name": "Automation", "id": 3, "sort_order": 3.0}, - {"name": "Dashboards", "id": 15, "sort_order": 4.0}, - {"name": "Database", "id": 5, "sort_order": 5.0}, - {"name": "Docker - Kubernetes", "id": 8, "sort_order": 6.0}, - {"name": "Document - Notes", "id": 14, "sort_order": 7.0}, - {"name": "File - Code", "id": 16, "sort_order": 8.0}, - {"name": "Home Assistant", "id": 2, "sort_order": 9.0}, - {"name": "Media - Photo", "id": 12, "sort_order": 10.0}, - {"name": "Monitoring - Analytics", "id": 7, "sort_order": 11.0}, - {"name": "MQTT", "id": 4, "sort_order": 12.0}, - {"name": "NVR - DVR", "id": 17, "sort_order": 13.0}, - {"name": "Operating System", "id": 9, "sort_order": 14.0}, - {"name": "Server - Networking", "id": 11, "sort_order": 15.0}, - {"name": "TurnKey", "id": 10, "sort_order": 16.0}, - {"name": "Zigbee - Zwave", "id": 6, "sort_order": 17.0}, + {"name": "*Arr Suite", "id": 18, "sort_order": 3.0}, + {"name": "Automation", "id": 3, "sort_order": 4.0}, + {"name": "Dashboards", "id": 15, "sort_order": 5.0}, + {"name": "Database", "id": 5, "sort_order": 6.0}, + {"name": "Docker - Kubernetes", "id": 8, "sort_order": 7.0}, + {"name": "Document - Notes", "id": 14, "sort_order": 8.0}, + {"name": "File - Code", "id": 16, "sort_order": 9.0}, + {"name": "Home Assistant", "id": 2, "sort_order": 10.0}, + {"name": "Media - Photo", "id": 12, "sort_order": 11.0}, + {"name": "Monitoring - Analytics", "id": 7, "sort_order": 12.0}, + {"name": "MQTT", "id": 4, "sort_order": 13.0}, + {"name": "NVR - DVR", "id": 17, "sort_order": 14.0}, + {"name": "Operating System", "id": 9, "sort_order": 15.0}, + {"name": "Server - Networking", "id": 11, "sort_order": 16.0}, + {"name": "TurnKey", "id": 10, "sort_order": 17.0}, + {"name": "Matter/Zigbee/ZWave", "id": 6, "sort_order": 18.0}, {"name": "Miscellaneous", "id": 0, "sort_order": 99.0} ] } diff --git a/json/notifiarr.json b/json/notifiarr.json index d0db1191..b88cc2eb 100644 --- a/json/notifiarr.json +++ b/json/notifiarr.json @@ -2,7 +2,7 @@ "name": "Notifiarr", "slug": "notifiarr", "categories": [ - 7 + 18 ], "date_created": "2024-06-12", "type": "ct", @@ -36,4 +36,4 @@ "type": "warning" } ] -} \ No newline at end of file +} diff --git a/json/prowlarr.json b/json/prowlarr.json index c9677d03..4a9e4662 100644 --- a/json/prowlarr.json +++ b/json/prowlarr.json @@ -2,7 +2,7 @@ "name": "Prowlarr", "slug": "prowlarr", "categories": [ - 12 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/json/radarr.json b/json/radarr.json index 669372e9..a56fc847 100644 --- a/json/radarr.json +++ b/json/radarr.json @@ -2,7 +2,7 @@ "name": "Radarr", "slug": "radarr", "categories": [ - 12 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/json/readarr.json b/json/readarr.json index 0b5832e9..f0780f80 100644 --- a/json/readarr.json +++ b/json/readarr.json @@ -2,7 +2,7 @@ "name": "Readarr", "slug": "readarr", "categories": [ - 12 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/json/recyclarr.json b/json/recyclarr.json index 59f7fb9c..0090f772 100644 --- a/json/recyclarr.json +++ b/json/recyclarr.json @@ -2,7 +2,7 @@ "name": "Recyclarr", "slug": "recyclarr", "categories": [ - 12 + 18 ], "date_created": "2024-11-15", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/json/sonarr.json b/json/sonarr.json index 1c9d1ec6..a29e2f20 100644 --- a/json/sonarr.json +++ b/json/sonarr.json @@ -2,7 +2,7 @@ "name": "Sonarr", "slug": "sonarr", "categories": [ - 12 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} diff --git a/json/tdarr.json b/json/tdarr.json index 0d4b5129..011da903 100644 --- a/json/tdarr.json +++ b/json/tdarr.json @@ -2,7 +2,7 @@ "name": "Tdarr", "slug": "tdarr", "categories": [ - 12 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -36,4 +36,4 @@ "type": "warning" } ] -} \ No newline at end of file +} diff --git a/json/whisparr.json b/json/whisparr.json index e7b736e6..7e1d288b 100644 --- a/json/whisparr.json +++ b/json/whisparr.json @@ -2,7 +2,7 @@ "name": "Whisparr", "slug": "whisparr", "categories": [ - 12 + 18 ], "date_created": "2024-05-02", "type": "ct", @@ -31,4 +31,4 @@ "password": null }, "notes": [] -} \ No newline at end of file +} From c63e1dc78abb06264bab7c01dedb2b534258b118 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:31:13 +0100 Subject: [PATCH 22/22] Update CHANGELOG.md (#372) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bdaa1b7..6a2f478c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,9 +25,14 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Fix Wallos Update [@MickLesk](https://github.com/MickLesk) ([#339](https://github.com/community-scripts/ProxmoxVE/pull/339)) - Linkwarden: Move Secret Key above in install.sh [@MickLesk](https://github.com/MickLesk) ([#356](https://github.com/community-scripts/ProxmoxVE/pull/356)) - Linkwarden: add gnupg to installed dependencies [@erfansamandarian](https://github.com/erfansamandarian) ([#349](https://github.com/community-scripts/ProxmoxVE/pull/349)) -- Fix Wallos Update [@MickLesk](https://github.com/MickLesk) ([#339](https://github.com/community-scripts/ProxmoxVE/pull/339)) + +### 🌐 Website + +- Add *Arr Suite category for Website [@MickLesk](https://github.com/MickLesk) ([#370](https://github.com/community-scripts/ProxmoxVE/pull/370)) +- Refactor Buttons component to use a ButtonLink for cleaner code, simplifying the source URL generation and layout [@BramSuurdje](https://github.com/BramSuurdje) ([#371](https://github.com/community-scripts/ProxmoxVE/pull/371)) ### 🧰 Maintenance