Test bin Files

Transactions
Dan 2017-11-03 10:31:13 -06:00
parent a616b51ef3
commit e595938ef0
3 changed files with 15 additions and 4 deletions

View File

@ -0,0 +1,5 @@
#!/bin/sh
/sbin/pidof /home/ofbbutte/webapps/ofb_angular_test/bin/node > /dev/null 2>&1 && exit 0
mkdir -p /home/ofbbutte/webapps/ofb_angular_test/run
nohup /home/ofbbutte/webapps/ofb_angular_test/bin/node /home/ofbbutte/webapps/ofb_angular_test/src/app.js > /dev/null 2>&1 &
/sbin/pidof /home/ofbbutte/webapps/ofb_angular_test/bin/node > /home/ofbbutte/webapps/ofb_angular_test/run/node.pid

View File

@ -0,0 +1,2 @@
#!/bin/sh
/usr/bin/pkill -f /home/ofbbutte/webapps/ofb_angular_test/bin/node && rm -f /home/ofbbutte/webapps/ofb_angular_test/run/node.pid

View File

@ -16,8 +16,6 @@ fi
if [ "$BRANCH" = master ]; then
cd /home/ofbbutte/webapps/ofb_angular_test/
fi
exit 1
echo "Node Version"
bin/node --version
@ -53,8 +51,14 @@ echo "Remove start and stop script files"
rm -f bin/start
rm -f bin/stop
echo "Copying start and stop script files"
mv tempcheckout/Server/bin/start bin/start
mv tempcheckout/Server/bin/stop bin/stop
if [ "$BRANCH" = master ]; then
mv tempcheckout/Server/bin/start bin/start
mv tempcheckout/Server/bin/stop bin/stop
fi
if [ "$BRANCH" = test ]; then
mv tempcheckout/Server/bin/start_test bin/start
mv tempcheckout/Server/bin/stop_test bin/stop
fi
ls
echo "Modifying permissions on start and stop script files to be executable"
chmod +x bin/start