|
|
@ -15,6 +15,7 @@ REPO=${REPO%.git} |
|
|
|
read -r -d '' VAR <<EOF |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
export NODE_PATH=/home/$USER/$REPO/swarmlab-app/src/node_modules |
|
|
|
pm2-runtime /home/$USER/crond/playground.config.js |
|
|
|
|
|
|
|
EOF |
|
|
@ -80,12 +81,24 @@ read -r -d '' VAR <<EOF |
|
|
|
|
|
|
|
su -c 'cd /home/$USER/$REPO/swarmlab-app/src; npm install; npm install express --save; ' - node |
|
|
|
#su -c 'cd /home/$USER/$REPO/swarmlab-app/src; npm install; npm install express --save; npm cache clean --force;' - node |
|
|
|
su -c 'pm2-runtime /home/$USER/crond/playground.config.js' - node |
|
|
|
#su -c 'pm2-runtime /home/$USER/crond/playground.config.js' - node |
|
|
|
|
|
|
|
|
|
|
|
EOF |
|
|
|
echo "$VAR" > /home/$USER/crond/playground-npm-install.sh |
|
|
|
|
|
|
|
# --------------------------- |
|
|
|
# run node from supervisor |
|
|
|
# -------------------------- |
|
|
|
read -r -d '' VAR <<EOF |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
export NODE_PATH=/home/$USER/$REPO/swarmlab-app/src/node_modules |
|
|
|
pm2-runtime /home/$USER/crond/playground.config.js |
|
|
|
|
|
|
|
|
|
|
|
EOF |
|
|
|
echo "$VAR" > /home/$USER/crond/playground-npm-run.sh |
|
|
|
|
|
|
|
|
|
|
|
# ***************************************************** |
|
|
|