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"
while [ $COUNTER -lt 15 ]; do
echo "Running script"
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 Password_01 false
echo "Running script"
exit 0
echo "Waiting for xPub..."
sleep 20
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