zeus 4 years ago
parent
commit
84b2afedb5
  1. 4
      startup.sh
  2. 10
      supervisord-iot.conf

4
startup.sh

@ -93,8 +93,8 @@ echo "$VAR" > /home/$USER/crond/playground-npm-install.sh
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
export NODE_PATH=/home/$USER/$REPO/swarmlab-app/src/node_modules
cd /home/$USER/$REPO/swarmlab-app/src; npm install express --save; pm2-runtime /home/$USER/crond/playground.config.js
EOF

10
supervisord-iot.conf

@ -6,11 +6,11 @@ stdout_logfile=/var/log/ttyd.log
autorestart=true
[program:pm2]
environment =
NODE_PATH=/home/node/playground-myexample-nodejs/swarmlab-app/src/node_modules,
myTEST=bar
command=bash -c 'sleep 5 && /home/%(ENV_USER)s/crond/playground-npm-run.sh '
user=node
#environment =
# NODE_PATH=/home/node/playground-myexample-nodejs/swarmlab-app/src/node_modules,
# myTEST=bar
command=bash -c "sleep 5 && su -c 'home/%(ENV_USER)s/crond/playground-npm-run.sh' - node "
#user=node
stdout_logfile=/var/log/pm2.log
autorestart=true

Loading…
Cancel
Save