use variable for python executable
This commit is contained in:
parent
cd4ae21855
commit
73b8658c99
1 changed files with 11 additions and 9 deletions
20
ctl
20
ctl
|
@ -10,6 +10,8 @@ BASE=`pwd`
|
|||
SYSTEM=`uname -s`
|
||||
PLATFORM=`uname -m`
|
||||
|
||||
PYTHON=python3
|
||||
|
||||
DATA="$BASE/data"
|
||||
if [ ! -e "$DATA" ] && [ -e "$BASE/config" ]; then
|
||||
if [ "$1" == "stop" ] || [ "$1" == "restart" ]; then
|
||||
|
@ -95,7 +97,7 @@ if [ "$1" == "start" ]; then
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
python3 oml server "$PID"
|
||||
$PYTHON oml server "$PID"
|
||||
exit $?
|
||||
fi
|
||||
if [ "$1" == "debug" ]; then
|
||||
|
@ -107,7 +109,7 @@ if [ "$1" == "debug" ]; then
|
|||
fi
|
||||
fi
|
||||
shift
|
||||
python3 oml server debug "$PID"
|
||||
$PYTHON oml server debug "$PID"
|
||||
exit $?
|
||||
fi
|
||||
if [ "$1" == "stop" ]; then
|
||||
|
@ -147,11 +149,11 @@ if [ "$1" == "open" ]; then
|
|||
if ps -p `cat "$PID"` > /dev/null; then
|
||||
xdg-open "file://${BASE}/openmedialibrary/static/html/load.html"
|
||||
else
|
||||
python3 "${NAME}/oml/gtkstatus.py" $@
|
||||
$PYTHON "${NAME}/oml/gtkstatus.py" $@
|
||||
exit $?
|
||||
fi
|
||||
else
|
||||
python3 "$NAME/oml/gtkstatus.py" $@
|
||||
$PYTHON "$NAME/oml/gtkstatus.py" $@
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
|
@ -163,7 +165,7 @@ if [ "$1" == "autostart" ]; then
|
|||
fi
|
||||
if [ $SYSTEM == "Linux" ]; then
|
||||
if [ ! -e "$PID" ]; then
|
||||
python3 "$NAME/oml/gtkstatus.py" --autostart
|
||||
$PYTHON "$NAME/oml/gtkstatus.py" --autostart
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
|
@ -172,7 +174,7 @@ fi
|
|||
|
||||
if [ "$1" == "ui" ]; then
|
||||
shift
|
||||
python3 "$NAME/oml/ui.py" $@
|
||||
$PYTHON "$NAME/oml/ui.py" $@
|
||||
exit $?
|
||||
fi
|
||||
if [ "$1" == "init" ]; then
|
||||
|
@ -210,17 +212,17 @@ if [ "$1" == "update" ]; then
|
|||
NEW=`"$0" version`
|
||||
"$0" postupdate -o $OLD -n $NEW
|
||||
else
|
||||
python3 oml update
|
||||
$PYTHON oml update
|
||||
fi
|
||||
exit $?
|
||||
fi
|
||||
if [ "$1" == "python" ]; then
|
||||
cd "$BASE/$NAME"
|
||||
shift
|
||||
python3 $@
|
||||
$PYTHON $@
|
||||
exit $?
|
||||
fi
|
||||
|
||||
cd "$BASE/$NAME"
|
||||
python3 oml $@
|
||||
$PYTHON oml $@
|
||||
exit $?
|
||||
|
|
Loading…
Reference in a new issue