zeus 4 years ago
parent
commit
48a815fd98
  1. 3
      startup.sh
  2. 3
      supervisord-iot.conf

3
startup.sh

@ -78,7 +78,8 @@ chmod +x /home/$USER/crond/playground-sync.sh
read -r -d '' VAR <<EOF
#!/bin/bash
su -c 'cd /home/node/playground-nodejs/swarmlab-app/src; npm install; npm cache clean --force;' - node
su -c 'cd /home/$USER/$REPO/swarmlab-app/src; npm install; npm install express; npm cache clean --force;' - node
EOF
echo "$VAR" > /home/$USER/crond/playground-npm-install.sh

3
supervisord-iot.conf

@ -1,5 +1,6 @@
[program:ttyd]
command=bash -c 'sleep 5 && cd /home/node && sudo -u node ttyd --ssl --ssl-cert /home/node/ssl-ttyd/ca.crt --ssl-key /home/mode/ssl-ttyd/ca.key -c user:%(ENV_PASSWORD)s -p 8088 -u node bash'
#command=bash -c 'sleep 5 && cd /home/node && sudo -u node ttyd --ssl --ssl-cert /home/node/ssl-ttyd/ca.crt --ssl-key /home/mode/ssl-ttyd/ca.key -c user:%(ENV_PASSWORD)s -p 8088 -u node bash'
command=bash -c 'sleep 5 && cd /home/node && su -c \'ttyd --ssl --ssl-cert /home/node/ssl-ttyd/ca.crt --ssl-key /home/mode/ssl-ttyd/ca.key -c user:%(ENV_PASSWORD)s -p 8088 -u node bash\' - node '
stdout_logfile=/var/log/ttyd.log
autorestart=true

Loading…
Cancel
Save