From e9d6f10b3c0b7afebe13617b1ac5f7bb49ad9b8b Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 5 Oct 2023 09:11:08 -0400 Subject: [PATCH] Update pingvin.sh create update path --- ct/pingvin.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/ct/pingvin.sh b/ct/pingvin.sh index 20ad9b67..cba10c06 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -52,8 +52,26 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +if [[ ! -d /opt/pingvin-share ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Stopping Pingvin Share" +pm2 stop pingvin-share-backend pingvin-share-frontend &>/dev/null +msg_ok "Stopped Pingvin Share" + +msg_info "Updating Pingvin Share" +cd /opt/pingvin-share +git fetch --tags +git checkout $(git describe --tags `git rev-list --tags --max-count=1`) &>/dev/null +cd backend +npm run build &>/dev/null +cd ../frontend +npm run build &>/dev/null +msg_ok "Updated Pingvin Share" + +msg_info "Starting Pingvin Share" +pm2 start pingvin-share-backend pingvin-share-frontend &>/dev/null +msg_ok "Started Pingvin Share" + +msg_ok "Updated Successfully" exit }