|
|
@ -55,11 +55,14 @@ read -r -d '' VAR <<EOF |
|
|
|
if [ ! -d "$REPO" ] ; then |
|
|
|
cd /home/$USER |
|
|
|
git clone $GIT_TUTOR |
|
|
|
chown -R $USER.$USER /home/$USER |
|
|
|
|
|
|
|
else |
|
|
|
cd /home/$USER/$REPO |
|
|
|
git fetch origin master |
|
|
|
git reset --hard FETCH_HEAD |
|
|
|
git clean -df |
|
|
|
chown -R $USER.$USER /home/$USER |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
@ -75,12 +78,10 @@ chmod +x /home/$USER/crond/playground-sync.sh |
|
|
|
read -r -d '' VAR <<EOF |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
cd /home/$USER/$REPO/swarmlab-app/src |
|
|
|
npm install; |
|
|
|
npm cache clean --force; |
|
|
|
sudo -H -u node /bin/bash -c 'cd /home/$USER/$REPO/swarmlab-app/src; npm install; npm cache clean --force;' |
|
|
|
|
|
|
|
EOF |
|
|
|
echo "$VAR" > /home/$USER/crond/playground-sync.sh |
|
|
|
echo "$VAR" > /home/$USER/crond/playground-npm-install.sh |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -138,7 +139,8 @@ chown -R $USER.$USER /home/$USER |
|
|
|
chmod -R 755 /home/$USER |
|
|
|
|
|
|
|
|
|
|
|
/home/$USER/crond/playground-start.sh |
|
|
|
/home/$USER/crond/playground-sync.sh |
|
|
|
sudo -H -u node bash /home/$USER/crond/playground-npm-install.sh |
|
|
|
/home/$USER/crond/playground-start.sh |
|
|
|
|
|
|
|
/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf |
|
|
|