minor bugfixes / msgs

This commit is contained in:
CanbiZ 2025-10-25 20:23:36 +02:00 committed by GitHub
parent 04bc8c9655
commit 809a0c701b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,6 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# Source: https://github.com/PatchMon/PatchMon # Source: https://github.com/PatchMon/PatchMon
APP="PatchMon" APP="PatchMon"
APP_NAME=${APP,,}
var_tags="${var_tags:-monitoring}" var_tags="${var_tags:-monitoring}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-2048}"
@ -31,22 +30,19 @@ function update_script() {
fi fi
NODE_VERSION="24" setup_nodejs NODE_VERSION="24" setup_nodejs
if check_for_gh_release "PatchMon" "PatchMon/PatchMon"; then if check_for_gh_release "PatchMon" "PatchMon/PatchMon"; then
msg_info "Stopping Service"
msg_info "Stopping $APP"
systemctl stop patchmon-server systemctl stop patchmon-server
msg_ok "Stopped $APP" msg_ok "Stopped Service"
msg_info "Creating Backup" msg_info "Creating Backup"
cp /opt/patchmon/backend/.env /opt/backend.env cp /opt/patchmon/backend/.env /opt/backend.env
cp /opt/patchmon/frontend/.env /opt/frontend.env cp /opt/patchmon/frontend/.env /opt/frontend.env
msg_ok "Backup Created" msg_ok "Backup Created"
rm -rf /opt/patchmon CLEAN_INSTALL=1 fetch_and_deploy_gh_release "PatchMon" "PatchMon/PatchMon" "tarball" "latest" "/opt/patchmon"
fetch_and_deploy_gh_release "PatchMon" "PatchMon/PatchMon" "tarball" "latest" "/opt/patchmon"
msg_info "Updating ${APP}" msg_info "Updating PatchMon"
cd /opt/patchmon cd /opt/patchmon
export NODE_ENV=production export NODE_ENV=production
$STD npm install --no-audit --no-fund --no-save --ignore-scripts $STD npm install --no-audit --no-fund --no-save --ignore-scripts
@ -60,11 +56,12 @@ function update_script() {
mv /opt/frontend.env /opt/patchmon/frontend/.env mv /opt/frontend.env /opt/patchmon/frontend/.env
$STD npx prisma migrate deploy $STD npx prisma migrate deploy
$STD npx prisma generate $STD npx prisma generate
msg_ok "Updated ${APP}" msg_ok "Updated PatchMon"
msg_info "Starting $APP" msg_info "Starting Service"
systemctl start patchmon-server systemctl start patchmon-server
msg_ok "Started $APP" msg_ok "Started Service"
msg_ok "Updated Successfully!"
fi fi
exit exit
} }