run pm2 as normal user

This commit is contained in:
Girish Ramakrishnan 2015-11-19 01:44:07 -08:00
parent 7d65402dfa
commit 3ef3b9ca8e
1 changed files with 2 additions and 2 deletions

View File

@ -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