Compare commits

...

2 Commits

Author SHA1 Message Date
ngarafol
95dbf93591
use pm2 with systemd to make pingvin-share survive reboots (#3935) 2024-10-20 17:03:21 -04:00
Jacob
9a0cb6b8f5
Changedetection update enhancements (#3933) 2024-10-20 14:02:09 -04:00
3 changed files with 16 additions and 3 deletions

View File

@ -62,6 +62,16 @@ if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then
fi fi
pip3 install changedetection.io --upgrade &>/dev/null pip3 install changedetection.io --upgrade &>/dev/null
pip3 install playwright --upgrade &>/dev/null pip3 install playwright --upgrade &>/dev/null
if [[ -f /etc/systemd/system/browserless.service ]]; then
git -C /opt/browserless/ pull &>/dev/null
npm update --prefix /opt/browserless &>/dev/null
npm run build --prefix /opt/browserless &>/dev/null
npm run build:function --prefix /opt/browserless &>/dev/null
npm prune production --prefix /opt/browserless &>/dev/null
systemctl restart browserless
else
msg_error "No Browserless Installation Found!"
fi
systemctl restart changedetection systemctl restart changedetection
msg_ok "Updated Successfully" msg_ok "Updated Successfully"
exit exit

View File

@ -56,7 +56,7 @@ function update_script() {
header_info header_info
if [[ ! -d /opt/pingvin-share ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ ! -d /opt/pingvin-share ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Stopping Pingvin Share" msg_info "Stopping Pingvin Share"
pm2 stop pingvin-share-backend pingvin-share-frontend &>/dev/null systemctl stop pm2-root.service
msg_ok "Stopped Pingvin Share" msg_ok "Stopped Pingvin Share"
msg_info "Updating Pingvin Share" msg_info "Updating Pingvin Share"
@ -72,7 +72,7 @@ npm run build &>/dev/null
msg_ok "Updated Pingvin Share" msg_ok "Updated Pingvin Share"
msg_info "Starting Pingvin Share" msg_info "Starting Pingvin Share"
pm2 start pingvin-share-backend pingvin-share-frontend &>/dev/null systemctl start pm2-root.service
msg_ok "Started Pingvin Share" msg_ok "Started Pingvin Share"
msg_ok "Updated Successfully" msg_ok "Updated Successfully"

View File

@ -47,7 +47,10 @@ sed -i '/"admin.config.smtp.allow-unauthorized-certificates":\|admin.config.smtp
$STD npm install $STD npm install
$STD npm run build $STD npm run build
$STD pm2 start --name="pingvin-share-frontend" npm -- run start $STD pm2 start --name="pingvin-share-frontend" npm -- run start
$STD pm2 startup # create and enable pm2-root systemd script
$STD pm2 startup systemd
# save running pm2 processes so pingvin-share can survive reboots
$STD pm2 save
msg_ok "Installed Pingvin Share" msg_ok "Installed Pingvin Share"
motd_ssh motd_ssh