check if pid is still running

This commit is contained in:
j 2016-01-13 11:39:41 +05:30
parent 8528a4450f
commit 2e60ade8ff

6
ctl
View file

@ -86,8 +86,10 @@ fi
if [ "$1" == "debug" ]; then if [ "$1" == "debug" ]; then
cd "$BASE/$NAME" cd "$BASE/$NAME"
if [ -e $PID ]; then if [ -e $PID ]; then
echo openmedialibrary already running if ps -p `cat "$PID"` > /dev/null; then
exit 1 echo openmedialibrary already running
exit 1
fi
fi fi
shift shift
python3 oml server debug $PID python3 oml server debug $PID