From 0e8341cb8640d240fe2a9cdb1eb6034d53a1861e Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:45:03 +0100 Subject: [PATCH] fix: shellcheck changes (#10591) --- ct/crafty-controller.sh | 2 +- ct/livebook.sh | 2 +- ct/meilisearch.sh | 2 +- ct/nginxproxymanager.sh | 2 +- ct/vaultwarden.sh | 2 +- ct/vikunja.sh | 2 +- ct/watcharr.sh | 4 ++-- ct/wger.sh | 2 +- ct/wireguard.sh | 2 +- ct/wizarr.sh | 2 +- ct/zipline.sh | 2 +- install/2fauth-install.sh | 2 +- install/actualbudget-install.sh | 4 ++-- install/apache-guacamole-install.sh | 6 +++--- install/crafty-controller-install.sh | 4 ++-- install/vaultwarden-install.sh | 2 +- install/vikunja-install.sh | 2 +- install/wallos-install.sh | 2 +- install/watcharr-install.sh | 4 ++-- install/wger-install.sh | 4 ++-- install/whisparr-install.sh | 2 +- install/wireguard-install.sh | 2 +- install/zipline-install.sh | 2 +- 23 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ct/crafty-controller.sh b/ct/crafty-controller.sh index d6d4e89e5..9c5ea1cc3 100644 --- a/ct/crafty-controller.sh +++ b/ct/crafty-controller.sh @@ -49,7 +49,7 @@ function update_script() { $STD unzip crafty-4-v"${RELEASE}".zip cp -a crafty-4-v"${RELEASE}"/. /opt/crafty-controller/crafty/crafty-4/ rm -rf crafty-4-v"${RELEASE}" - cd /opt/crafty-controller/crafty/crafty-4 || exit + cd /opt/crafty-controller/crafty/crafty-4 sudo -u crafty bash -c ' source /opt/crafty-controller/crafty/.venv/bin/activate pip3 install --no-cache-dir -r requirements.txt diff --git a/ct/livebook.sh b/ct/livebook.sh index 7b44fd735..00e853dc3 100755 --- a/ct/livebook.sh +++ b/ct/livebook.sh @@ -41,7 +41,7 @@ function update_script() { msg_info "Updating Livebook" source /opt/livebook/.env - cd /opt/livebook || exit + cd /opt/livebook $STD mix escript.install hex livebook --force chown -R livebook:livebook /opt/livebook /data diff --git a/ct/meilisearch.sh b/ct/meilisearch.sh index ee5233d10..71306b7a9 100644 --- a/ct/meilisearch.sh +++ b/ct/meilisearch.sh @@ -60,7 +60,7 @@ function update_script() { fetch_and_deploy_gh_release "meilisearch-ui" "riccox/meilisearch-ui" "tarball" msg_info "Configuring Meilisearch-UI" - cd /opt/meilisearch-ui || exit + cd /opt/meilisearch-ui sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts mv /tmp/.env.local.bak /opt/meilisearch-ui/.env.local $STD pnpm install diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index f8adc025b..df0534093 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -122,7 +122,7 @@ function update_script() { msg_info "Building Frontend" export NODE_OPTIONS="--max_old_space_size=2048 --openssl-legacy-provider" - cd /opt/nginxproxymanager/frontend || exit + cd /opt/nginxproxymanager/frontend # Replace node-sass with sass in package.json before installation sed -E -i 's/"node-sass" *: *"([^"]*)"/"sass": "\1"/g' package.json $STD yarn install --network-timeout 600000 diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 72d164310..ddd2e38e1 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -49,7 +49,7 @@ function update_script() { msg_info "Updating VaultWarden to $VAULT (Patience)" cd ~ && rm -rf vaultwarden $STD git clone https://github.com/dani-garcia/vaultwarden - cd vaultwarden || exit + cd vaultwarden $STD cargo build --features "sqlite,mysql,postgresql" --release DIR=/usr/bin/vaultwarden if [ -d "$DIR" ]; then diff --git a/ct/vikunja.sh b/ct/vikunja.sh index f0e03acb2..beacf8aa3 100644 --- a/ct/vikunja.sh +++ b/ct/vikunja.sh @@ -34,7 +34,7 @@ function update_script() { msg_ok "Stopped Service" msg_info "Updating ${APP} to ${RELEASE}" - cd /opt || exit + cd /opt rm -rf /opt/vikunja/vikunja curl -fsSL "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" -o $(basename "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb") export DEBIAN_FRONTEND=noninteractive diff --git a/ct/watcharr.sh b/ct/watcharr.sh index 83719c4f6..7bc5b2e1b 100644 --- a/ct/watcharr.sh +++ b/ct/watcharr.sh @@ -38,12 +38,12 @@ function update_script() { fetch_and_deploy_gh_release "watcharr" "sbondCo/Watcharr" "tarball" msg_info "Updating Watcharr" - cd /opt/watcharr || exit + cd /opt/watcharr export GOOS=linux $STD npm i $STD npm run build mv ./build ./server/ui - cd server || exit + cd server $STD go mod download $STD go build -o ./watcharr msg_ok "Updated Watcharr" diff --git a/ct/wger.sh b/ct/wger.sh index d50e486ac..44d980bdb 100644 --- a/ct/wger.sh +++ b/ct/wger.sh @@ -38,7 +38,7 @@ function update_script() { curl -fsSL "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" -o "$temp_file" tar xzf "$temp_file" cp -rf wger-"$RELEASE"/* /home/wger/src - cd /home/wger/src || exit + cd /home/wger/src $STD pip install -r requirements_prod.txt --ignore-installed $STD pip install -e . $STD python3 manage.py migrate diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 5005dc379..b6b4ef0cd 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -38,7 +38,7 @@ function update_script() { apt -y upgrade if [[ -d /etc/wgdashboard ]]; then sleep 2 - cd /etc/wgdashboard/src || exit + cd /etc/wgdashboard/src ./wgd.sh update ./wgd.sh start fi diff --git a/ct/wizarr.sh b/ct/wizarr.sh index 4f2990dc2..59fd4e100 100644 --- a/ct/wizarr.sh +++ b/ct/wizarr.sh @@ -45,7 +45,7 @@ function update_script() { fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr" msg_info "Updating Wizarr" - cd /opt/wizarr || exit + cd /opt/wizarr $STD /usr/local/bin/uv sync --frozen $STD /usr/local/bin/uv run --frozen pybabel compile -d app/translations $STD npm --prefix app/static install diff --git a/ct/zipline.sh b/ct/zipline.sh index 62676dc3d..7fb085e42 100644 --- a/ct/zipline.sh +++ b/ct/zipline.sh @@ -43,7 +43,7 @@ function update_script() { fetch_and_deploy_gh_release "zipline" "diced/zipline" "tarball" msg_info "Updating ${APP}" - cd /opt/zipline || exit + cd /opt/zipline mv /opt/.env /opt/zipline/.env $STD pnpm install $STD pnpm build diff --git a/install/2fauth-install.sh b/install/2fauth-install.sh index 8c6174128..3ed71eefe 100644 --- a/install/2fauth-install.sh +++ b/install/2fauth-install.sh @@ -26,7 +26,7 @@ import_local_ip fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth" msg_info "Setup 2FAuth" -cd /opt/2fauth || exit +cd /opt/2fauth cp .env.example .env sed -i -e "s|^APP_URL=.*|APP_URL=http://$LOCAL_IP|" \ -e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \ diff --git a/install/actualbudget-install.sh b/install/actualbudget-install.sh index 84876a444..746f36cf2 100644 --- a/install/actualbudget-install.sh +++ b/install/actualbudget-install.sh @@ -23,7 +23,7 @@ NODE_VERSION="22" setup_nodejs create_self_signed_cert msg_info "Installing Actual Budget" -cd /opt || exit +cd /opt RELEASE=$(get_latest_github_release "actualbudget/actual") mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config} chown -R root:root /opt/actualbudget-data @@ -50,7 +50,7 @@ cat </opt/actualbudget-data/config.json } EOF mkdir -p /opt/actualbudget -cd /opt/actualbudget || exit +cd /opt/actualbudget $STD npm install --location=global @actual-app/sync-server echo "${RELEASE}" >~/.actualbudget msg_ok "Installed Actual Budget" diff --git a/install/apache-guacamole-install.sh b/install/apache-guacamole-install.sh index 42f1adb17..b10e466e0 100644 --- a/install/apache-guacamole-install.sh +++ b/install/apache-guacamole-install.sh @@ -55,7 +55,7 @@ msg_info "Setup Apache Guacamole" mkdir -p /etc/guacamole/{extensions,lib} RELEASE_SERVER=$(curl -fsSL https://api.github.com/repos/apache/guacamole-server/tags | jq -r '.[].name' | grep -v -- '-RC' | head -n 1) curl -fsSL "https://api.github.com/repos/apache/guacamole-server/tarball/refs/tags/${RELEASE_SERVER}" | tar -xz --strip-components=1 -C /opt/apache-guacamole/server -cd /opt/apache-guacamole/server || exit +cd /opt/apache-guacamole/server export CPPFLAGS="-Wno-error=deprecated-declarations" $STD autoreconf -fi $STD ./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots --disable-guaclog @@ -64,7 +64,7 @@ $STD make install $STD ldconfig RELEASE_CLIENT=$(curl -fsSL https://api.github.com/repos/apache/guacamole-client/tags | jq -r '.[].name' | grep -v -- '-RC' | head -n 1) curl -fsSL "https://downloads.apache.org/guacamole/${RELEASE_CLIENT}/binary/guacamole-${RELEASE_CLIENT}.war" -o "/opt/apache-guacamole/tomcat9/webapps/guacamole.war" -cd /root || exit +cd /root curl -fsSL "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-9.3.0.tar.gz" -o "/root/mysql-connector-j-9.3.0.tar.gz" $STD tar -xf ~/mysql-connector-j-9.3.0.tar.gz mv ~/mysql-connector-j-9.3.0/mysql-connector-j-9.3.0.jar /etc/guacamole/lib/ @@ -87,7 +87,7 @@ $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUS echo "Database Password: $DB_PASS" echo "Database Name: $DB_NAME" } >>~/guacamole.creds -cd guacamole-auth-jdbc-"${RELEASE_SERVER}"/mysql/schema || exit +cd guacamole-auth-jdbc-"${RELEASE_SERVER}"/mysql/schema cat *.sql | mariadb -u root ${DB_NAME} { echo "mysql-hostname: 127.0.0.1" diff --git a/install/crafty-controller-install.sh b/install/crafty-controller-install.sh index ced6cc9da..b72879653 100644 --- a/install/crafty-controller-install.sh +++ b/install/crafty-controller-install.sh @@ -40,7 +40,7 @@ msg_ok "Setup Python3" msg_info "Installing Crafty-Controller (Patience)" useradd crafty -m -s /bin/bash -cd /opt || exit +cd /opt mkdir -p /opt/crafty-controller/crafty /opt/crafty-controller/server RELEASE=$(curl -fsSL "https://gitlab.com/api/v4/projects/20430749/releases" | grep -o '"tag_name":"v[^"]*"' | head -n 1 | sed 's/"tag_name":"v//;s/"//') echo "${RELEASE}" >"/opt/crafty-controller_version.txt" @@ -49,7 +49,7 @@ $STD unzip crafty-4-v"${RELEASE}".zip cp -a crafty-4-v"${RELEASE}"/. /opt/crafty-controller/crafty/crafty-4/ rm -rf crafty-4-v"${RELEASE}" -cd /opt/crafty-controller/crafty || exit +cd /opt/crafty-controller/crafty python3 -m venv .venv chown -R crafty:crafty /opt/crafty-controller/ $STD sudo -u crafty bash -c ' diff --git a/install/vaultwarden-install.sh b/install/vaultwarden-install.sh index 9356d9250..b3ceb1e11 100644 --- a/install/vaultwarden-install.sh +++ b/install/vaultwarden-install.sh @@ -37,7 +37,7 @@ msg_ok "Installed Rust" msg_info "Building Vaultwarden ${VAULT} (Patience)" $STD git clone https://github.com/dani-garcia/vaultwarden -cd vaultwarden || exit +cd vaultwarden $STD cargo build --features "sqlite,mysql,postgresql" --release msg_ok "Built Vaultwarden ${VAULT}" diff --git a/install/vikunja-install.sh b/install/vikunja-install.sh index 714ee96fe..1d13609b9 100644 --- a/install/vikunja-install.sh +++ b/install/vikunja-install.sh @@ -18,7 +18,7 @@ $STD apt install -y make msg_ok "Installed Dependencies" msg_info "Setup Vikunja (Patience)" -cd /opt || exit +cd /opt RELEASE=$(curl -fsSL https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) curl -fsSL "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" -o vikunja-"$RELEASE"-amd64.deb $STD dpkg -i vikunja-"$RELEASE"-amd64.deb diff --git a/install/wallos-install.sh b/install/wallos-install.sh index 137beb1e5..1394e3008 100644 --- a/install/wallos-install.sh +++ b/install/wallos-install.sh @@ -18,7 +18,7 @@ PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="imagick,bz2,sqlite3" setup_php fetch_and_deploy_gh_release "wallos" "ellite/Wallos" "tarball" msg_info "Installing Wallos (Patience)" -cd /opt/wallos || exit +cd /opt/wallos mv /opt/wallos/db/wallos.empty.db /opt/wallos/db/wallos.db chown -R www-data:www-data /opt/wallos chmod -R 755 /opt/wallos diff --git a/install/watcharr-install.sh b/install/watcharr-install.sh index 38cc66039..7874df46b 100644 --- a/install/watcharr-install.sh +++ b/install/watcharr-install.sh @@ -22,11 +22,11 @@ NODE_VERSION="22" setup_nodejs fetch_and_deploy_gh_release "watcharr" "sbondCo/Watcharr" "tarball" msg_info "Setup Watcharr" -cd /opt/watcharr || exit +cd /opt/watcharr $STD npm i $STD npm run build mv ./build ./server/ui -cd server || exit +cd server export CGO_ENABLED=1 GOOS=linux $STD go mod download $STD go build -o ./watcharr diff --git a/install/wger-install.sh b/install/wger-install.sh index 24c21f288..ddc90a179 100644 --- a/install/wger-install.sh +++ b/install/wger-install.sh @@ -36,12 +36,12 @@ chmod g+w /home/wger/db /home/wger/db/database.sqlite mkdir /home/wger/{static,media} chmod o+w /home/wger/media temp_dir=$(mktemp -d) -cd "$temp_dir" || exit +cd "$temp_dir" RELEASE=$(curl -fsSL https://api.github.com/repos/wger-project/wger/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') curl -fsSL "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" -o "$RELEASE.tar.gz" tar xzf "$RELEASE".tar.gz mv wger-"$RELEASE" /home/wger/src -cd /home/wger/src || exit +cd /home/wger/src $STD pip install -r requirements_prod.txt --ignore-installed $STD pip install -e . $STD wger create-settings --database-path /home/wger/db/database.sqlite diff --git a/install/whisparr-install.sh b/install/whisparr-install.sh index 3151dde74..38d5f790b 100644 --- a/install/whisparr-install.sh +++ b/install/whisparr-install.sh @@ -20,7 +20,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Whisparr" mkdir -p /var/lib/whisparr/ chmod 775 /var/lib/whisparr/ -cd /var/lib/whisparr/ || exit +cd /var/lib/whisparr/ $STD curl -fsSL 'https://whisparr.servarr.com/v1/update/nightly/updatefile?os=linux&runtime=netcore&arch=x64' -o whisparr.tar.gz $STD tar -xvzf whisparr.tar.gz mv Whisparr /opt diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 695fd6e65..2e69f3e1a 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -28,7 +28,7 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard msg_info "Installing WGDashboard" - cd /etc/wgdashboard/src || exit + cd /etc/wgdashboard/src chmod u+x wgd.sh $STD ./wgd.sh install . /etc/os-release diff --git a/install/zipline-install.sh b/install/zipline-install.sh index 4673a5674..73723020d 100644 --- a/install/zipline-install.sh +++ b/install/zipline-install.sh @@ -22,7 +22,7 @@ SECRET_KEY="$(openssl rand -base64 42 | tr -dc 'a-zA-Z0-9')" echo "Zipline Secret Key: ${SECRET_KEY}" >>~/zipline.creds msg_info "Installing Zipline (Patience)" -cd /opt/zipline || exit +cd /opt/zipline cat </opt/zipline/.env DATABASE_URL=postgres://$PG_DB_USER:$PG_DB_PASS@localhost:5432/$PG_DB_NAME CORE_SECRET=$SECRET_KEY