From 3493f3089fb122b664e7ac2b7fc1f76e911483e9 Mon Sep 17 00:00:00 2001 From: Martino Salvetti Date: Wed, 17 Apr 2013 13:20:30 +0200 Subject: [PATCH 1/2] In Arch Linux python means Python3. I'll improve this modification in order to support both Arch and the other distributions --- start | 2 +- stop | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/start b/start index 5b29aef9..beb376a1 100755 --- a/start +++ b/start @@ -1,2 +1,2 @@ #!/bin/bash -nohup /usr/bin/python -u server.py &>> /var/log/electrum.log & +nohup /usr/bin/python2 -u server.py &>> /var/log/electrum.log & diff --git a/stop b/stop index 89b1111c..1ba75adb 100755 --- a/stop +++ b/stop @@ -1,2 +1,2 @@ #!/bin/bash -/usr/bin/python server.py stop +/usr/bin/python2 server.py stop From 7792ba4eab5ac01bae23f205e5cc45970703342c Mon Sep 17 00:00:00 2001 From: Martino Salvetti Date: Wed, 17 Apr 2013 13:20:30 +0200 Subject: [PATCH 2/2] In Arch Linux python means Python3. start and stop check if there is a python2 binary into PATH before call python --- start | 6 +++++- stop | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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