summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts
diff options
context:
space:
mode:
authortv <tv@xso>2011-08-12 23:23:33 +0200
committertv <tv@xso>2011-08-12 23:23:33 +0200
commit2048448601aa27f993268ef67bf0eeda3625ef4e (patch)
tree1e7dcd3ec26e20e14bca59418ea3a84fbfc48fc9 /retiolum/scripts
parent533add06bf1c5dfb2824c4f861b9288fe5448c4d (diff)
retiolum: go more enterprise
Diffstat (limited to 'retiolum/scripts')
-rwxr-xr-xretiolum/scripts/autostart/create-startup.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/retiolum/scripts/autostart/create-startup.sh b/retiolum/scripts/autostart/create-startup.sh
index 3513a515..37edb972 100755
--- a/retiolum/scripts/autostart/create-startup.sh
+++ b/retiolum/scripts/autostart/create-startup.sh
@@ -6,12 +6,17 @@ if test "${nosudo-false}" != true -a `id -u` != 0; then
exit 23 # go to hell
fi
+readlink="`readlink -f "$0"`"
+dirname="`dirname "$0"`"
+cd "$dirname"
+
if [ -e /etc/init.d ];then
INIT_FOLDER=/etc/init.d
update-rc.d tinc defaults #TODO debian specific
else
+ INIT_FOLDER=/etc/rc.d
echo "add tinc to DAEMONS in /etc/rc.conf" #TODO archlinux specific
fi
echo "retiolum" > /etc/tinc/nets.boot
-cp -a tinc $INITFOLDER
+cp -a tinc $INIT_FOLDER