use old pid if still around

This commit is contained in:
j 2016-01-05 22:37:14 +05:30
parent 030aee8f8a
commit d4c310f15a

3
ctl
View file

@ -11,11 +11,14 @@ BASE=`pwd`
SYSTEM=`uname -s` SYSTEM=`uname -s`
PLATFORM=`uname -m` PLATFORM=`uname -m`
if [ -e $PID ]; then
else
if [ -e "$BASE/config/tor/hostname" ]; then if [ -e "$BASE/config/tor/hostname" ]; then
onion=$(cat "$BASE/config/tor/hostname") onion=$(cat "$BASE/config/tor/hostname")
id=${onion/.onion/} id=${onion/.onion/}
PID="/tmp/$NAME.$USER.$id.pid" PID="/tmp/$NAME.$USER.$id.pid"
fi fi
fi
if [ -e "$BASE/local_platform" ]; then if [ -e "$BASE/local_platform" ]; then
export PLATFORM_ENV="$BASE/local_platform" export PLATFORM_ENV="$BASE/local_platform"