X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=blobdiff_plain;f=start;h=6bf666817022d239842b52c9dfdb8de5aead50aa;hp=8cf88b62d18d3a5bf8bcc52666c29ddb26b5cc65;hb=5bf13f457fcb02e4cf1de3796064d9ce4041e07e;hpb=3025cc9d6c44000ea36e8e8c71f3a5e91b75c8c6 diff --git a/start b/start index 8cf88b6..6bf6668 100755 --- a/start +++ b/start @@ -1,5 +1,12 @@ #!/bin/bash +PID=`/usr/bin/python server.py getpid` +if [[ $PID != *[!0-9]* ]]; then + echo "Server already running (pid $PID)" + exit +fi + + electrum_config="/etc/electrum.conf" if [ ! -f $electrum_config ]; then @@ -26,5 +33,5 @@ if [ ! -d $path ]; then fi fi -echo "starting server as daemon" +echo "Starting server as daemon" nohup /usr/bin/python -u server.py &> /var/log/electrum.log &