diff --git a/start b/start index 5b29aef9..0fd82274 100755 --- a/start +++ b/start @@ -1,2 +1,6 @@ #!/bin/bash -nohup /usr/bin/python -u server.py &>> /var/log/electrum.log & +which python2 &> /dev/null +RET=$? +[ $RET -eq 0 ] && PYTHON=`which python2` +[ $RET -ne 0 ] && PYTHON=`which python` +nohup $PYTHON -u server.py &>> /var/log/electrum.log & diff --git a/stop b/stop index 89b1111c..5f4d07c6 100755 --- a/stop +++ b/stop @@ -1,2 +1,6 @@ #!/bin/bash -/usr/bin/python server.py stop +which python2 &> /dev/null +RET=$? +[ $RET -eq 0 ] && PYTHON=`which python2` +[ $RET -ne 0 ] && PYTHON=`which python` +$PYTHON server.py stop