summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Ekman (yarrick) <yarrick@kryo.se>2007-08-06 13:23:57 +0000
committerErik Ekman (yarrick) <yarrick@kryo.se>2007-08-06 13:23:57 +0000
commitcfc9ee23f6822a658817f4e4103669553d60714f (patch)
treeb24e5f7ff83d3296bba7a59165ac95648926ed79 /net-misc/iodine/files
parentmedia-video/subtitleeditor: Fix dependencies (diff)
downloadsunrise-cfc9ee23f6822a658817f4e4103669553d60714f.tar.gz
sunrise-cfc9ee23f6822a658817f4e4103669553d60714f.tar.bz2
sunrise-cfc9ee23f6822a658817f4e4103669553d60714f.zip
net-misc/iodine: Added init script, bumped to r1
svn path=/sunrise/; revision=4388
Diffstat (limited to 'net-misc/iodine/files')
-rw-r--r--net-misc/iodine/files/iodined.conf36
-rw-r--r--net-misc/iodine/files/iodined.init54
2 files changed, 90 insertions, 0 deletions
diff --git a/net-misc/iodine/files/iodined.conf b/net-misc/iodine/files/iodined.conf
new file mode 100644
index 000000000..f52fd3413
--- /dev/null
+++ b/net-misc/iodine/files/iodined.conf
@@ -0,0 +1,36 @@
+# /etc/conf.d/iodined: config file for /etc/init.d/iodined
+
+# Drop privileges to this user after startup
+# This is used by the -u argument. Comment out to keep running as root.
+IODINED_USER="nobody"
+
+# Chroot to this directory after startup
+# This is used by the -t argument. Comment out to avoid chroot.
+IODINED_CHROOT="/var/empty"
+
+# This password needs to be used in all clients when they connect
+# This is used by the -P argument
+IODINED_PASSWD=""
+
+# This is the MTU (Max Transmit Unit) used in the tunnel.
+# Default is 1024. Setting it to 210 will keep packets < 512 bytes,
+# which increases chances of getting through firewalls.
+# This is used by the -m argument
+#IODINED_MTU=210
+
+# The server port to listen on. You should normally not change this.
+# See man page. This is used by the -p argument
+#IODINED_LISTENPORT=53
+
+# The IP number to listen on.
+# This is used by the -l argument
+#IODINED_LISTENIP=127.0.0.1
+
+# This IP number will be used by the local tun device.
+IODINED_IP="172.28.0.1"
+
+# Use subdomains to this domain for network tunneling
+# If a real domain is used, it should be delegated to this server with
+# a NS entry in the domain zone (see man page)
+IODINED_DOMAIN="blah.abc"
+
diff --git a/net-misc/iodine/files/iodined.init b/net-misc/iodine/files/iodined.init
new file mode 100644
index 000000000..8721ef539
--- /dev/null
+++ b/net-misc/iodine/files/iodined.init
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting iodined"
+ ARGS=""
+ if [ "$IODINED_USER" ]; then
+ ARGS="$ARGS -u $IODINED_USER"
+ fi
+ if [ "$IODINED_CHROOT" ]; then
+ ARGS="$ARGS -t $IODINED_CHROOT"
+ fi
+ if [ "$IODINED_MTU" ]; then
+ ARGS="$ARGS -m $IODINED_MTU"
+ fi
+ if [ "$IODINED_LISTENPORT" ]; then
+ ARGS="$ARGS -p $IODINED_LISTENPORT"
+ fi
+ if [ "$IODINED_LISTENIP" ]; then
+ ARGS="$ARGS -l $IODINED_LISTENIP"
+ fi
+ if [ "$IODINED_PASSWD" ]; then
+ ARGS="$ARGS -P $IODINED_PASSWD"
+ else
+ eerror "Please set a password (IODINED_PASSWD) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ if [ "$IODINED_IP" ]; then
+ ARGS="$ARGS $IODINED_IP"
+ else
+ eerror "Please set an IP (IODINED_IP) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ if [ "$IODINED_DOMAIN" ]; then
+ ARGS="$ARGS $IODINED_DOMAIN"
+ else
+ eerror "Please set a domain (IODINED_DOMAIN) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ start-stop-daemon --start --exec /usr/bin/iodined -- $ARGS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping iodined"
+ start-stop-daemon --stop --exec /usr/bin/iodined
+ eend $?
+}