check if pid is still running

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

2
ctl
View file

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