concordia-server/scripts/cmake_stubs/start.sh.in
2015-06-09 13:01:42 +02:00

24 lines
480 B
Bash
Executable File

#!/bin/sh
set -e
nginxProcesses=`ps aux | grep nginx | wc -l`
if [ $nginxProcesses -le 1 ]
then
echo "nginx is not running" >&2
exit 1
fi
pidFile="@SCRIPTS_PATH@/concordia-server.PID"
if [ -e $pidFile ]
then
echo "concordia server is already running with PID:" `cat $pidFile` >&2
exit 1
else
spawn-fcgi -p 8000 -n "@COMPILED_BINARIES_PATH@"/concordia_server_process &
echo $! > $pidFile
echo "concordia-server started with PID:" `cat $pidFile`
fi