diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 799aa3593..b7f28964a 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -45,14 +45,16 @@ function update_script() { fi msg_info "Switching update script to Seerr" - cat <<'EOF' >/usr/bin/update + TMP_UPDATE=$(mktemp) + cat <<'EOF' >"$TMP_UPDATE" #!/usr/bin/env bash bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/seerr.sh)" EOF + mv "$TMP_UPDATE" /usr/bin/update chmod +x /usr/bin/update msg_ok "Switched update script to Seerr" msg_warn "Please type 'update' again to complete the migration" - exit + exit 0 fi msg_info "Updating Jellyseerr" diff --git a/ct/overseerr.sh b/ct/overseerr.sh index 53f0a5dad..c8d0fec18 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -44,10 +44,12 @@ function update_script() { fi msg_info "Switching update script to Seerr" - cat <<'EOF' >/usr/bin/update + TMP_UPDATE=$(mktemp) + cat <<'EOF' >"$TMP_UPDATE" #!/usr/bin/env bash bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/seerr.sh)" EOF + mv "$TMP_UPDATE" /usr/bin/update chmod +x /usr/bin/update msg_ok "Switched update script to Seerr" msg_warn "Please type 'update' again to complete the migration"