From 2a28807d8fb1b9177065882b99c5399363dd1a90 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 1 Apr 2025 17:55:14 +0200 Subject: [PATCH] fix curl commands (#3568) --- ct/heimdall-dashboard.sh | 12 ++++++------ ct/pterodactyl-wings.sh | 4 ++-- ct/zitadel.sh | 6 +++--- install/daemonsync-install.sh | 2 +- install/flaresolverr-install.sh | 2 +- install/heimdall-dashboard-install.sh | 14 +++++++------- install/kubo-install.sh | 2 +- install/seafile-install.sh | 2 +- install/zitadel-install.sh | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ct/heimdall-dashboard.sh b/ct/heimdall-dashboard.sh index fa4765014..f65b896f3 100644 --- a/ct/heimdall-dashboard.sh +++ b/ct/heimdall-dashboard.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - RELEASE=$(curl -fsSLX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') + RELEASE=$(curl -fsSL "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 msg_info "Stopping ${APP}" systemctl stop heimdall @@ -40,23 +40,23 @@ function update_script() { msg_ok "Backed up Data" msg_info "Updating Heimdall Dashboard to ${RELEASE}" curl -fsSL "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" -o $(basename "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz") - tar xzf ${RELEASE}.tar.gz + tar xzf "${RELEASE}".tar.gz VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - cp -R Heimdall-${VER}/* /opt/Heimdall - cd /opt/Heimdall + cp -R Heimdall-"${VER}"/* /opt/Heimdall + cd /opt/Heimdall || exit $STD apt-get install -y composer export COMPOSER_ALLOW_SUPERUSER=1 $STD composer dump-autoload echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated Heimdall Dashboard to ${RELEASE}" msg_info "Restoring Data" - cd ~ + cd ~ || exit cp -R database-backup/* /opt/Heimdall/database cp -R public-backup/* /opt/Heimdall/public sleep 1 msg_ok "Restored Data" msg_info "Cleanup" - rm -rf {${RELEASE}.tar.gz,Heimdall-${VER},public-backup,database-backup,Heimdall} + rm -rf {"${RELEASE}".tar.gz,Heimdall-"${VER}",public-backup,database-backup,Heimdall} sleep 1 msg_ok "Cleaned" msg_info "Starting ${APP}" diff --git a/ct/pterodactyl-wings.sh b/ct/pterodactyl-wings.sh index 3a1aa6526..72142827e 100644 --- a/ct/pterodactyl-wings.sh +++ b/ct/pterodactyl-wings.sh @@ -35,7 +35,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" rm /usr/local/bin/wings -curl -fsSL "https://github.com/pterodactyl/wings/releases/download/v${RELEASE}/wings_linux_amd64" -o "/usr/local/bin/wings" + curl -fsSL "https://github.com/pterodactyl/wings/releases/download/v${RELEASE}/wings_linux_amd64" -o "/usr/local/bin/wings" chmod u+x /usr/local/bin/wings echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" @@ -55,4 +55,4 @@ build_container description msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" diff --git a/ct/zitadel.sh b/ct/zitadel.sh index 2d0c9c7bf..9085dd7fb 100644 --- a/ct/zitadel.sh +++ b/ct/zitadel.sh @@ -27,15 +27,15 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - RELEASE=$(curl -fsSLi https://github.com/zitadel/zitadel/releases/latest | grep location: | cut -d '/' -f 8 | tr -d '\r') + RELEASE=$(curl -fsSL https://github.com/zitadel/zitadel/releases/latest | grep location: | cut -d '/' -f 8 | tr -d '\r') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt | grep -oP '\d+\.\d+\.\d+')" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping $APP" systemctl stop zitadel msg_ok "Stopped $APP" msg_info "Updating $APP to ${RELEASE}" - cd /tmp - curl -fsSL https://github.com/zitadel/zitadel/releases/download/$RELEASE/zitadel-linux-amd64.tar.gz | tar -xz + cd /tmp || exit + curl -fsSL https://github.com/zitadel/zitadel/releases/download/"$RELEASE"/zitadel-linux-amd64.tar.gz | tar -xz mv zitadel-linux-amd64/zitadel /usr/local/bin $STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/install/daemonsync-install.sh b/install/daemonsync-install.sh index fcba3b959..1afc20af3 100644 --- a/install/daemonsync-install.sh +++ b/install/daemonsync-install.sh @@ -18,7 +18,7 @@ $STD apt-get install -y g++-multilib msg_ok "Installed Dependencies" msg_info "Installing Daemon Sync Server" -curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/daemonsync_2.2.0.0059_amd64.deb -O +curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/daemonsync_2.2.0.0059_amd64.deb -O "daemonsync_2.2.0.0059_amd64.deb" $STD dpkg -i daemonsync_2.2.0.0059_amd64.deb msg_ok "Installed Daemon Sync Server" diff --git a/install/flaresolverr-install.sh b/install/flaresolverr-install.sh index 3c5ca4f38..f9d99e315 100644 --- a/install/flaresolverr-install.sh +++ b/install/flaresolverr-install.sh @@ -29,7 +29,7 @@ msg_ok "Installed Chrome" msg_info "Installing FlareSolverr" RELEASE=$(curl -fsSL https://github.com/FlareSolverr/FlareSolverr/releases/latest | grep "title>Release" | cut -d " " -f 4) -$STD curl -fsSL "https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz" -O +$STD curl -fsSL "https://github.com/FlareSolverr/FlareSolverr/releases/download/$RELEASE/flaresolverr_linux_x64.tar.gz" -O "flaresolverr_linux_x64.tar.gz" $STD tar -xzf flaresolverr_linux_x64.tar.gz -C /opt $STD rm flaresolverr_linux_x64.tar.gz echo "${RELEASE}" >/opt/${APPLICATION}_version.txt diff --git a/install/heimdall-dashboard-install.sh b/install/heimdall-dashboard-install.sh index 7c52f9f96..f1feb6873 100644 --- a/install/heimdall-dashboard-install.sh +++ b/install/heimdall-dashboard-install.sh @@ -19,15 +19,15 @@ $STD apt-get install -y composer $STD apt-get install -y php8.2-{bz2,curl,sqlite3,zip,xml} msg_ok "Installed Dependencies" -RELEASE=$(curl -fsSLX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +RELEASE=$(curl -fsSL "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') +echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt msg_info "Installing Heimdall Dashboard ${RELEASE}" curl -fsSL "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" -o $(basename "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz") -tar xzf ${RELEASE}.tar.gz +tar xzf "${RELEASE}".tar.gz VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -rm -rf ${RELEASE}.tar.gz -mv Heimdall-${VER} /opt/Heimdall -cd /opt/Heimdall +rm -rf "${RELEASE}".tar.gz +mv Heimdall-"${VER}" /opt/Heimdall +cd /opt/Heimdall || exit cp .env.example .env $STD php artisan key:generate msg_ok "Installed Heimdall Dashboard ${RELEASE}" @@ -50,7 +50,7 @@ TimeoutStopSec=30 [Install] WantedBy=multi-user.target" >$service_path systemctl enable -q --now heimdall.service -cd /opt/Heimdall +cd /opt/Heimdall || exit COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null systemctl restart heimdall.service msg_ok "Created Service" diff --git a/install/kubo-install.sh b/install/kubo-install.sh index e21570a77..95a015281 100644 --- a/install/kubo-install.sh +++ b/install/kubo-install.sh @@ -20,7 +20,7 @@ msg_ok "Installed Dependencies" msg_info "Installing IPFS" RELEASE=$(curl -fsSL https://github.com/ipfs/kubo/releases/latest | grep "title>Release" | cut -d " " -f 4) -$STD curl -fsSL "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-amd64.tar.gz" -O +$STD curl -fsSL "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-amd64.tar.gz" -o "kubo_${RELEASE}_linux-amd64.tar.gz" tar -xzf "kubo_${RELEASE}_linux-amd64.tar.gz" -C /usr/local $STD ln -s /usr/local/kubo/ipfs /usr/local/bin/ipfs $STD ipfs init diff --git a/install/seafile-install.sh b/install/seafile-install.sh index 2e0a352ca..4e2326b39 100644 --- a/install/seafile-install.sh +++ b/install/seafile-install.sh @@ -89,7 +89,7 @@ useradd seafile mkdir -p /home/seafile chown seafile: /home/seafile chown seafile: /opt/seafile -$STD su - seafile -c "curl -fsSL https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_11.0.13_x86-64.tar.gz -O" +$STD su - seafile -c "curl -fsSL https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_11.0.13_x86-64.tar.gz -o seafile-server_11.0.13_x86-64.tar.gz" $STD su - seafile -c "tar -xzf seafile-server_11.0.13_x86-64.tar.gz -C /opt/seafile/" $STD su - seafile -c "expect <