unlink pid file on exit, exec server in ctl script
This commit is contained in:
parent
2a7122d7fb
commit
8b23ea9658
2 changed files with 10 additions and 16 deletions
16
ctl
16
ctl
|
|
@ -48,9 +48,7 @@ if [ "$1" == "start" ]; then
|
|||
python3 oml install_update
|
||||
cd "$BASE/$NAME"
|
||||
fi
|
||||
python3 oml server $PID
|
||||
rm -f $PID
|
||||
exit $?
|
||||
exec python3 oml server $PID
|
||||
fi
|
||||
if [ "$1" == "debug" ]; then
|
||||
cd "$BASE/$NAME"
|
||||
|
|
@ -59,8 +57,7 @@ if [ "$1" == "debug" ]; then
|
|||
exit 1
|
||||
fi
|
||||
shift
|
||||
python3 oml server $@
|
||||
exit $?
|
||||
exec python3 oml server $@
|
||||
fi
|
||||
if [ "$1" == "stop" ]; then
|
||||
test -e $PID && kill `cat $PID`
|
||||
|
|
@ -89,8 +86,7 @@ if [ "$1" == "open" ]; then
|
|||
fi
|
||||
if [ "$1" == "ui" ]; then
|
||||
shift
|
||||
python3 $NAME/oml/ui.py $@
|
||||
exit $?
|
||||
exec python3 $NAME/oml/ui.py $@
|
||||
fi
|
||||
if [ "$1" == "update" ]; then
|
||||
cd "$BASE/$NAME"
|
||||
|
|
@ -114,10 +110,8 @@ fi
|
|||
if [ "$1" == "python" ]; then
|
||||
cd "$BASE/$NAME"
|
||||
shift
|
||||
python3 $@
|
||||
exit $?
|
||||
exec python3 $@
|
||||
fi
|
||||
|
||||
cd "$BASE/$NAME"
|
||||
python3 oml $@
|
||||
exit $?
|
||||
exec python3 oml $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue