Browse Source

add -m supervisor

master
zeus 4 years ago
parent
commit
55afe71190
  1. 2
      startup.sh
  2. 3
      supervisord-iot.conf

2
startup.sh

@ -97,7 +97,7 @@ read -r -d '' VAR <<EOF
#!/bin/bash #!/bin/bash
export NODE_PATH=/home/$USER/$REPO/swarmlab-app/src/node_modules:/usr/local/lib/node_modules/npm/node_modules export NODE_PATH=/home/$USER/$REPO/swarmlab-app/src/node_modules:/usr/local/lib/node_modules/npm/node_modules
cd /home/$USER/$REPO/swarmlab-app/src; npm install express --save; pm2-runtime /home/$USER/crond/playground.config.js cd /home/$USER/$REPO/swarmlab-app/src; npm install express --save; /usr/local/bin/pm2-runtime /home/$USER/crond/playground.config.js
EOF EOF

3
supervisord-iot.conf

@ -9,7 +9,8 @@ autorestart=true
#environment = #environment =
# NODE_PATH=/home/node/playground-myexample-nodejs/swarmlab-app/src/node_modules, # NODE_PATH=/home/node/playground-myexample-nodejs/swarmlab-app/src/node_modules,
# myTEST=bar # myTEST=bar
command=bash -c "sleep 5 && su -c 'home/%(ENV_USER)s/crond/playground-npm-run.sh' - node " #command=bash -c "sleep 5 && su -c 'home/%(ENV_USER)s/crond/playground-npm-run.sh' - node "
command=bash -c "sleep 5 && su -m -l node -c '/home/%(ENV_USER)s/crond/playground-npm-run.sh' "
#user=node #user=node
stdout_logfile=/var/log/pm2.log stdout_logfile=/var/log/pm2.log
autorestart=true autorestart=true

Loading…
Cancel
Save