update web-check
This commit is contained in:
parent
3dc784029b
commit
955b3f467c
@ -27,7 +27,35 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
msg_error "Currently we don't provide an update function for this App."
|
|
||||||
|
if check_for_gh_release "web-check" "MickLesk/web-check"; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop web-check
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Creating backup"
|
||||||
|
mv /opt/web-check/.env /opt
|
||||||
|
msg_ok "Created backup"
|
||||||
|
|
||||||
|
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "web-check" "MickLesk/web-check"
|
||||||
|
|
||||||
|
msg_info "Building Web-Check"
|
||||||
|
cd /opt/web-check
|
||||||
|
$STD yarn install --frozen-lockfile --network-timeout 100000
|
||||||
|
$STD yarn build --production
|
||||||
|
rm -rf /var/lib/apt/lists/* /app/node_modules/.cache
|
||||||
|
msg_ok "Built Web-Check"
|
||||||
|
|
||||||
|
msg_info "Restoring backup"
|
||||||
|
mv /opt/.env /opt/web-check
|
||||||
|
msg_ok "Restored backup"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start web-check
|
||||||
|
msg_ok "Started Service"
|
||||||
|
msg_ok "Updated Successfully!"
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user