summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts/tinc_setup/new_install.sh
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-01-29 18:05:20 +0100
committerlassulus <lassulus@googlemail.com>2013-01-29 18:05:20 +0100
commit58c8c76afbf980c22715272b6de1ae9287bddbe3 (patch)
treeacf113686749b74a8725d37bbdc6a31f4aa2e42d /retiolum/scripts/tinc_setup/new_install.sh
parent702b0bd06cf86a296243470e0a4ca9fe20c01407 (diff)
more osx support
Diffstat (limited to 'retiolum/scripts/tinc_setup/new_install.sh')
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh
index a52d1edc..1ff42e54 100755
--- a/retiolum/scripts/tinc_setup/new_install.sh
+++ b/retiolum/scripts/tinc_setup/new_install.sh
@@ -166,24 +166,31 @@ if [ $OS = 'android' ]; then
exit 1
else
TINCBIN=/data/data/org.poirsouille.tinc_gui/files/tincd
+ DEV="/dev/tun"
if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi
if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/storage/sdcard0/tinc-fu" ;fi
mount -o remount,rw /
mount -o remount,rw /system
- DEV="/dev/tun"
fi
-#elif [ $OS = 'osx' ]; then
-# echo 'this is not implemented'
-# exit 1
+elif [ $OS = 'osx' ]; then
+ if ! exists tincd >/dev/null; then
+ echo "Please install tinc"
+ exit 1
+ else
+ TINCBIN=tincd
+ DEV="/dev/net/tun"
+ if [ $TINCDIR = 'auto' ]; then TINCDIR="/usr/local/etc/tinc" ;fi
+ if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi
+ fi
else
if ! exists tincd >/dev/null; then
echo "Please install tinc"
exit 1
else
TINCBIN=tincd
+ DEV="/dev/net/tun"
if [ $TINCDIR = 'auto' ]; then TINCDIR="/etc/tinc" ;fi
if [ $TEMPDIR = 'auto' ]; then TEMPDIR="/tmp/tinc-install-fu" ;fi
- DEV="/dev/net/tun"
fi
fi
@@ -268,7 +275,7 @@ EOF
host2subnet $MASK4
#check if ip is installed
-if type ip >/dev/null; then
+if exists ip >/dev/null; then
echo 'dirname="`dirname "$0"`"' > tinc-up
echo '' >> tinc-up
echo 'conf=$dirname/tinc.conf' >> tinc-up