diff --git a/ct/cryptpad.sh b/ct/cryptpad.sh index 47e2564f6..7b7173a15 100644 --- a/ct/cryptpad.sh +++ b/ct/cryptpad.sh @@ -37,10 +37,10 @@ function update_script() { msg_info "Updating $APP to ${RELEASE}" temp_dir=$(mktemp -d) cp -f /opt/cryptpad/config/config.js /opt/config.js -curl -fsSL "https://github.com/cryptpad/cryptpad/archive/refs/tags/${RELEASE}.tar.gz" -P $temp_dir" -o $(basename "https://github.com/cryptpad/cryptpad/archive/refs/tags/${RELEASE}.tar.gz" -P $temp_dir") - cd $temp_dir - tar zxf $RELEASE.tar.gz - cp -rf cryptpad-$RELEASE/* /opt/cryptpad + curl -fsSL "https://github.com/cryptpad/cryptpad/archive/refs/tags/${RELEASE}.tar.gz" -o "$temp_dir/cryptpad-${RELEASE}.tar.gz" + cd "$temp_dir" + tar zxf "cryptpad-${RELEASE}.tar.gz" + cp -rf "cryptpad-${RELEASE}"/* /opt/cryptpad cd /opt/cryptpad $STD npm ci $STD npm run install:components @@ -71,4 +71,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/ct/komodo.sh b/ct/komodo.sh index 1f5aecc84..2f6e8e3a1 100644 --- a/ct/komodo.sh +++ b/ct/komodo.sh @@ -48,11 +48,11 @@ function update_script() { } GITHUB_URL="https://raw.githubusercontent.com/mbecker20/komodo/main/compose/${COMPOSE_FILE}" -curl -fsSL "$GITHUB_URL" || {" -o ""/opt/komodo/${COMPOSE_FILE}"" + if ! curl -fsSL "$GITHUB_URL" -o "/opt/komodo/${COMPOSE_FILE}"; then msg_error "Failed to download ${COMPOSE_FILE} from GitHub!" mv "/opt/komodo/${BACKUP_FILE}" "/opt/komodo/${COMPOSE_FILE}" exit 1 - } + fi $STD docker compose -p komodo -f "/opt/komodo/$COMPOSE_FILE" --env-file /opt/komodo/compose.env up -d msg_ok "Updated ${APP}" @@ -65,4 +65,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9120${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9120${CL}"