Browse Source

ecosystem

master
zeus 4 years ago
parent
commit
5e272e29c2
  1. 16
      swarmlab-app/startup.sh

16
swarmlab-app/startup.sh

@ -95,7 +95,7 @@ module.exports = {
"name" : "playground-nodejs", "name" : "playground-nodejs",
"autorestart" : true, "autorestart" : true,
"watch" : true, "watch" : true,
"script" : "/home/ubuntu/project/tutor/$REPO/swarmlab-app/src/run/app.js", "script" : "/home/ubuntu/project/$REPO/swarmlab-app/src/run/app.js",
"args" : "start", "args" : "start",
"pid_file" : "/home/ubuntu/run/pid.pid", "pid_file" : "/home/ubuntu/run/pid.pid",
"log_type" : "json", "log_type" : "json",
@ -120,12 +120,14 @@ chmod +x /home/ubuntu/crond/playground.config.js
read -r -d '' VAR <<EOF read -r -d '' VAR <<EOF
#!/bin/bash #!/bin/bash
cd /home/ubuntu/project/tutor/$REPO if [ ! -d "$REPO" ] ; then
git fetch origin master git clone $GIT_TUTOR
git reset --hard FETCH_HEAD else
git clean -df cd /home/ubuntu/project/$REPO
git fetch origin master
git reset --hard FETCH_HEAD
git clean -df
fi
EOF EOF
echo "$VAR" > /home/ubuntu/crond/playground-sync.sh echo "$VAR" > /home/ubuntu/crond/playground-sync.sh

Loading…
Cancel
Save