Skip to content
Snippets Groups Projects
Commit 4bfd9893 authored by Yuci Gou's avatar Yuci Gou
Browse files

#487 Manage PubSweet server using pm2

parent 1dddb48c
No related branches found
No related tags found
2 merge requests!114Shared data model,!115Dev
...@@ -5,24 +5,8 @@ cmd="pm2 start pm2.config.js" ...@@ -5,24 +5,8 @@ cmd="pm2 start pm2.config.js"
$cmd & $cmd &
echo "Wait up to 3 minutes for server to respond, check every 20 seconds" echo "Running post_init.sh script"
COUNTER=0 ./post_init.sh
while [ $COUNTER -lt 15 ]; do
RUNNING=$(curl --silent --connect-timeout 20 "http://localhost/" | grep "/assets/") echo "Initialization completed. PubSweet up running..."
if [ -n "$RUNNING" ] ; then tail -f /dev/null
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
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