summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts
diff options
context:
space:
mode:
authorLassulus <lassulus@googlemail.com>2012-12-12 05:07:32 +0100
committerLassulus <lassulus@googlemail.com>2012-12-12 05:07:32 +0100
commit507a7e6cad2316938efee372e51c1d042a807495 (patch)
treebd7caad57155c4591dde4429aefd5505c922e2df /retiolum/scripts
parentf1c3801f911671f2b42e1e0d010e04c9aa965661 (diff)
more android fixes
Diffstat (limited to 'retiolum/scripts')
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh
index 7a62e13b..832fcd91 100755
--- a/retiolum/scripts/tinc_setup/new_install.sh
+++ b/retiolum/scripts/tinc_setup/new_install.sh
@@ -256,10 +256,16 @@ fi
#generate full subnet information for v4
#test if tinc directory already exists
-if test -e /etc/tinc/$NETNAME; then
- echo "tinc config directory /etc/tinc/$NETNAME does already exist. (backup and) delete config directory and restart"
- exit 1
-fi
+if [ $OS -eq 2 ]; then
+ if test -e /usr/local/etc/tinc/$NETNAME; then
+ echo "tinc config directory /usr/local/etc/tinc/$NETNAME does already exist. (backup and) delete config directory and restart"
+ exit 1
+ fi
+else
+ if test -e /etc/tinc/$NETNAME; then
+ echo "tinc config directory /etc/tinc/$NETNAME does already exist. (backup and) delete config directory and restart"
+ exit 1
+ fi
#get tinc-hostfiles
mkdir -p $TEMPDIR/hosts
@@ -311,6 +317,7 @@ else
fi
mv $TEMPDIR/hosts ./
+rm -r $TEMDIR
echo "Subnet = $IP4" > hosts/$HOSTN
echo "Subnet = $IP6" >> hosts/$HOSTN