Commit 4bfd9893 authored by Yuci Gou's avatar Yuci Gou

#487 Manage PubSweet server using pm2

parent 1dddb48c
......@@ -5,24 +5,8 @@ cmd="pm2 start pm2.config.js"
$cmd &
echo "Wait up to 3 minutes for server to respond, check every 20 seconds"
COUNTER=0
while [ $COUNTER -lt 15 ]; do
echo "Running post_init.sh script"
./post_init.sh
RUNNING=$(curl --silent --connect-timeout 20 "http://localhost/" | grep "/assets/")
if [ -n "$RUNNING" ] ; then
echo "xPub is running"
#echo "Creating the Users"
#node scripts/adduser.js rakeshnambiar rakeshnbr@ebi.ac.uk Password_01 false
echo "Running post_init.sh script"
./post_init.sh
exit 0
fi
echo "Waiting for xPub..."
sleep 20
let COUNTER=COUNTER+1
done
echo "ERROR: xPub is not running"
exit 1
\ No newline at end of file
echo "Initialization completed. PubSweet up running..."
tail -f /dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment