add nvm initalizinge before first pm2 call, to prevent bug when called from webhook

This commit is contained in:
einhornimmond 2025-07-17 11:31:49 +02:00
parent fc0e54b5c7
commit e89b25f2d5

View File

@ -165,6 +165,9 @@ trap onError ERR
# stop all services
log_step "Stop and delete all Gradido services"
# make sure nvm is loaded
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# check if pm2 has processes, maybe it was already cleared from a failed update
# pm2 delete all if pm2 has no processes will trigger error and stop script
# so let's check first