git://git.novaco.in
/
electrum-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d7c603a
)
check pid before start
author
ThomasV
<thomasv1@gmx.de>
Tue, 25 Feb 2014 00:29:21 +0000 (
01:29
+0100)
committer
ThomasV
<thomasv1@gmx.de>
Tue, 25 Feb 2014 00:29:21 +0000 (
01:29
+0100)
start
patch
|
blob
|
history
diff --git
a/start
b/start
index
8cf88b6
..
6bf6668
100755
(executable)
--- 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 &