diff --git a/prepareDeployTarget.sh b/prepareDeployTarget.sh index f92b3fd..22b44e1 100644 --- a/prepareDeployTarget.sh +++ b/prepareDeployTarget.sh @@ -105,10 +105,10 @@ touch "${ECOSYSTEM}" chown -R $USER:$USER /home/$USER # run pm2 as current user ubuntu to avoid pm2 running as root below -pm2 status +sudo -u $USER pm2 status # ensure we run the latest version, this might not be the case if this script is ran against a already prepared server -pm2 updatePM2 +sudo -u $USER pm2 updatePM2 # setup the init scripts pm2 startup -u $USER