dont use exec
This commit is contained in:
parent
ff58cd9295
commit
e047ccf116
1 changed files with 15 additions and 8 deletions
23
ctl
23
ctl
|
@ -80,7 +80,8 @@ if [ "$1" == "start" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exec python3 oml server $PID
|
python3 oml server $PID
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
if [ "$1" == "debug" ]; then
|
if [ "$1" == "debug" ]; then
|
||||||
cd "$BASE/$NAME"
|
cd "$BASE/$NAME"
|
||||||
|
@ -89,7 +90,8 @@ if [ "$1" == "debug" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
exec python3 oml server debug $PID
|
python3 oml server debug $PID
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
if [ "$1" == "stop" ]; then
|
if [ "$1" == "stop" ]; then
|
||||||
remove_autostart
|
remove_autostart
|
||||||
|
@ -101,7 +103,7 @@ if [ "$1" == "stop" ]; then
|
||||||
do
|
do
|
||||||
sleep 1
|
sleep 1
|
||||||
waited=$(($waited+1))
|
waited=$(($waited+1))
|
||||||
if [ $waited -gt 10 ]; then
|
if [ $waited -gt 11 ]; then
|
||||||
kill -9 $_PID
|
kill -9 $_PID
|
||||||
sleep 1
|
sleep 1
|
||||||
fi
|
fi
|
||||||
|
@ -129,17 +131,20 @@ if [ "$1" == "open" ]; then
|
||||||
if ps -p `cat "$PID"` > /dev/null; then
|
if ps -p `cat "$PID"` > /dev/null; then
|
||||||
xdg-open "file://${BASE}/openmedialibrary/static/html/load.html"
|
xdg-open "file://${BASE}/openmedialibrary/static/html/load.html"
|
||||||
else
|
else
|
||||||
exec python3 "$NAME/oml/gtkstatus.py" $@
|
python3 "$NAME/oml/gtkstatus.py" $@
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exec python3 "$NAME/oml/gtkstatus.py" $@
|
python3 "$NAME/oml/gtkstatus.py" $@
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ "$1" == "ui" ]; then
|
if [ "$1" == "ui" ]; then
|
||||||
shift
|
shift
|
||||||
exec python3 "$NAME/oml/ui.py" $@
|
python3 "$NAME/oml/ui.py" $@
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
if [ "$1" == "update" ]; then
|
if [ "$1" == "update" ]; then
|
||||||
cd "$BASE/$NAME"
|
cd "$BASE/$NAME"
|
||||||
|
@ -163,8 +168,10 @@ fi
|
||||||
if [ "$1" == "python" ]; then
|
if [ "$1" == "python" ]; then
|
||||||
cd "$BASE/$NAME"
|
cd "$BASE/$NAME"
|
||||||
shift
|
shift
|
||||||
exec python3 $@
|
python3 $@
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$BASE/$NAME"
|
cd "$BASE/$NAME"
|
||||||
exec python3 oml $@
|
python3 oml $@
|
||||||
|
exit $?
|
||||||
|
|
Loading…
Reference in a new issue