check if pid is still running

This commit is contained in:
j 2016-01-13 11:39:41 +05:30
parent 8528a4450f
commit 2e60ade8ff
1 changed files with 4 additions and 2 deletions

6
ctl
View File

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