use old pid if still around

This commit is contained in:
j 2016-01-05 22:37:14 +05:30
parent 030aee8f8a
commit d4c310f15a
1 changed files with 3 additions and 0 deletions

3
ctl
View File

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