From 8e53737ac57d1866d92b01f73a8e6040fff482e2 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 Aug 2011 23:02:56 +0200 Subject: retiolum/autostart: makefile now script script updates the startup scripts and stuff. does the right thing (most of the time) --- retiolum/scripts/autostart/create-startup.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 retiolum/scripts/autostart/create-startup.sh (limited to 'retiolum/scripts/autostart/create-startup.sh') diff --git a/retiolum/scripts/autostart/create-startup.sh b/retiolum/scripts/autostart/create-startup.sh new file mode 100755 index 00000000..3513a515 --- /dev/null +++ b/retiolum/scripts/autostart/create-startup.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if test "${nosudo-false}" != true -a `id -u` != 0; then + echo "we're going sudo..." >&2 + exec sudo "$0" "$@" + exit 23 # go to hell +fi + +if [ -e /etc/init.d ];then + INIT_FOLDER=/etc/init.d + update-rc.d tinc defaults #TODO debian specific +else + echo "add tinc to DAEMONS in /etc/rc.conf" #TODO archlinux specific +fi + +echo "retiolum" > /etc/tinc/nets.boot +cp -a tinc $INITFOLDER -- cgit v1.2.3