check if process is still running

This commit is contained in:
j 2015-03-14 18:06:45 +05:30
parent 31485f1157
commit 193671be5c
1 changed files with 4 additions and 2 deletions

6
ctl
View File

@ -41,8 +41,10 @@ ulimit -S -n 2048
if [ "$1" == "start" ]; 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
if [ ! -d "$BASE/$NAME/.git" ]; then
python3 oml install_update