check if process is still running

This commit is contained in:
j 2015-03-14 18:06:45 +05:30
parent 31485f1157
commit 193671be5c

6
ctl
View file

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