check if process is still running

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

2
ctl
View file

@ -41,9 +41,11 @@ 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
if ps -p `cat "$PID"` > /dev/null; then
echo openmedialibrary already running echo openmedialibrary already running
exit 1 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
cd "$BASE/$NAME" cd "$BASE/$NAME"