Add explicit exit calls to update_script functions (#8752)

This commit is contained in:
CanbiZ
2025-10-30 05:03:54 -07:00
committed by GitHub
parent 2d9d62118f
commit 5a92816946
31 changed files with 36 additions and 42 deletions

View File

@@ -32,7 +32,6 @@ function update_script() {
msg_info "Restarting AdGuard Home" msg_info "Restarting AdGuard Home"
$STD rc-service adguardhome restart $STD rc-service adguardhome restart
msg_ok "Restarted AdGuard Home" msg_ok "Restarted AdGuard Home"
exit 0 exit 0
} }

View File

@@ -75,7 +75,6 @@ function update_script() {
else else
msg_ok "No update required. ${APP} is already at ${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi fi
exit 0 exit 0
} }

View File

@@ -32,7 +32,7 @@ function update_script() {
msg_info "Restarting Caddy" msg_info "Restarting Caddy"
rc-service caddy restart rc-service caddy restart
msg_ok "Restarted Caddy" msg_ok "Restarted Caddy"
exit exit 0
} }
start start

View File

@@ -41,6 +41,7 @@ function update_script() {
;; ;;
esac esac
done done
exit 0
} }
start start

View File

@@ -31,7 +31,6 @@ function update_script() {
msg_info "Restarting Forgejo" msg_info "Restarting Forgejo"
$STD rc-service forgejo restart $STD rc-service forgejo restart
msg_ok "Restarted Forgejo" msg_ok "Restarted Forgejo"
exit 0 exit 0
} }

View File

@@ -50,7 +50,7 @@ function update_script() {
else else
msg_ok "No update required. Garage is already at ${GITEA_RELEASE}" msg_ok "No update required. Garage is already at ${GITEA_RELEASE}"
fi fi
exit exit 0
} }
start start

View File

@@ -48,7 +48,6 @@ function update_script() {
else else
msg_ok "No update required. ${APP} is already at ${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi fi
exit 0 exit 0
} }

View File

@@ -32,7 +32,7 @@ function update_script() {
msg_info "Restarting Gitea" msg_info "Restarting Gitea"
rc-service gitea restart rc-service gitea restart
msg_ok "Restarted Gitea" msg_ok "Restarted Gitea"
exit exit 0
} }
start start

View File

@@ -54,6 +54,7 @@ function update_script() {
;; ;;
esac esac
done done
exit 0
} }
start start

View File

@@ -41,7 +41,6 @@ function update_script() {
else else
msg_ok "No update required. ${APP} is already at ${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi fi
exit 0 exit 0
} }

View File

@@ -55,7 +55,7 @@ function update_script() {
$STD docker compose -p komodo -f "$COMPOSE_FILE" --env-file /opt/komodo/compose.env pull $STD docker compose -p komodo -f "$COMPOSE_FILE" --env-file /opt/komodo/compose.env pull
$STD docker compose -p komodo -f "$COMPOSE_FILE" --env-file /opt/komodo/compose.env up -d $STD docker compose -p komodo -f "$COMPOSE_FILE" --env-file /opt/komodo/compose.env up -d
msg_ok "Updated ${APP}" msg_ok "Updated ${APP}"
exit exit 0
} }
start start

View File

@@ -31,7 +31,6 @@ function update_script() {
msg_info "Restarting MariaDB" msg_info "Restarting MariaDB"
$STD rc-service mariadb restart $STD rc-service mariadb restart
msg_ok "Restarted MariaDB" msg_ok "Restarted MariaDB"
exit 0 exit 0
} }

View File

@@ -50,6 +50,7 @@ function update_script() {
;; ;;
esac esac
done done
exit 0
} }
start start

View File

@@ -31,7 +31,6 @@ function update_script() {
msg_info "Updating Node-RED" msg_info "Updating Node-RED"
$STD npm install -g --unsafe-perm node-red $STD npm install -g --unsafe-perm node-red
msg_ok "Updated Node-RED" msg_ok "Updated Node-RED"
exit 0 exit 0
} }

View File

@@ -31,7 +31,6 @@ function update_script() {
msg_info "Restarting PostgreSQL" msg_info "Restarting PostgreSQL"
$STD rc-service postgresql restart $STD rc-service postgresql restart
msg_ok "Restarted PostgreSQL" msg_ok "Restarted PostgreSQL"
exit 0 exit 0
} }

View File

@@ -31,7 +31,6 @@ function update_script() {
msg_info "Restarting Prometheus" msg_info "Restarting Prometheus"
$STD rc-service prometheus restart $STD rc-service prometheus restart
msg_ok "Restarted Prometheus" msg_ok "Restarted Prometheus"
exit 0 exit 0
} }

View File

@@ -38,7 +38,6 @@ function update_script() {
else else
msg_ok "No update required. ${APP} is already at ${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi fi
exit 0 exit 0
} }

View File

@@ -41,9 +41,8 @@ function update_script() {
msg_info "Starting Service" msg_info "Starting Service"
$STD rc-service redlib start $STD rc-service redlib start
msg_ok "Started Service" msg_ok "Started Service"
msg_ok "Update Successful" msg_ok "Update Successful"
exit exit 0
} }
start start

View File

@@ -31,8 +31,7 @@ function update_script() {
msg_info "Restarting Syncthing" msg_info "Restarting Syncthing"
$STD rc-service syncthing restart $STD rc-service syncthing restart
msg_ok "Restarted Syncthing" msg_ok "Restarted Syncthing"
exit 0
exit 1
} }
start start

View File

@@ -44,7 +44,6 @@ function update_script() {
else else
msg_ok "No update required. ${APP} is already at ${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi fi
exit 0 exit 0
} }

View File

@@ -28,7 +28,7 @@ function update_script() {
msg_info "Upgrading traefik from edge" msg_info "Upgrading traefik from edge"
$STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community $STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
msg_ok "Upgraded traefik" msg_ok "Upgraded traefik"
exit exit 0
} }
start start

View File

@@ -31,8 +31,7 @@ function update_script() {
msg_info "Restarting Transmission" msg_info "Restarting Transmission"
$STD rc-service transmission-daemon restart $STD rc-service transmission-daemon restart
msg_ok "Restarted Transmission" msg_ok "Restarted Transmission"
exit 0
exit 1
} }
start start

View File

@@ -36,7 +36,6 @@ function update_script() {
$STD ./wgd.sh start $STD ./wgd.sh start
msg_ok "WGDashboard updated" msg_ok "WGDashboard updated"
fi fi
exit 0 exit 0
} }

View File

@@ -54,8 +54,9 @@ function update_script() {
msg_error "PLEASE MAKE A BACKUP FIRST!" msg_error "PLEASE MAKE A BACKUP FIRST!"
exit exit
fi fi
msg_ok "Updated Successfully" msg_ok "Updated Successfully!"
fi fi
exit
} }
start start

View File

@@ -28,6 +28,7 @@ function update_script() {
exit exit
fi fi
msg_ok "${APP} updates itself automatically!" msg_ok "${APP} updates itself automatically!"
exit
} }
start start
@@ -37,4 +38,4 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

View File

@@ -62,7 +62,6 @@ function update_script() {
sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json
$STD /opt/cronicle/bin/control.sh start $STD /opt/cronicle/bin/control.sh start
msg_ok "Installed Cronicle Worker" msg_ok "Installed Cronicle Worker"
echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n"
exit exit
fi fi

View File

@@ -20,23 +20,24 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /opt/freshrss ]]; then if [[ ! -d /opt/freshrss ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
if [ ! -x /opt/freshrss/cli/sensitive-log.sh ]; then if [ ! -x /opt/freshrss/cli/sensitive-log.sh ]; then
msg_info "Fixing wrong permissions" msg_info "Fixing wrong permissions"
chmod +x /opt/freshrss/cli/sensitive-log.sh chmod +x /opt/freshrss/cli/sensitive-log.sh
systemctl restart apache2 systemctl restart apache2
msg_ok "Fixed wrong permissions" msg_ok "Fixed wrong permissions"
else exit
msg_error "FreshRSS should be updated via the user interface." else
exit msg_error "FreshRSS should be updated via the user interface."
fi exit
fi
} }
start start

View File

@@ -31,6 +31,7 @@ function update_script() {
$STD apt update $STD apt update
$STD apt -y upgrade $STD apt -y upgrade
msg_ok "Updated $APP LXC" msg_ok "Updated $APP LXC"
exit
} }
start start

View File

@@ -50,6 +50,7 @@ function update_script() {
else else
msg_ok "$APP is already up to date (${RELEASE})" msg_ok "$APP is already up to date (${RELEASE})"
fi fi
exit
} }
start start

View File

@@ -40,6 +40,7 @@ function update_script() {
msg_ok "Started Service" msg_ok "Started Service"
msg_ok "Updated successfully!\n" msg_ok "Updated successfully!\n"
fi fi
exit
} }
start start

View File

@@ -40,6 +40,7 @@ function update_script() {
else else
msg_ok "${APP} is already up to date (${RELEASE})" msg_ok "${APP} is already up to date (${RELEASE})"
fi fi
exit
} }
start start