summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/support/modules/network_test_server/files/init
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network/support/modules/network_test_server/files/init')
-rwxr-xr-xtests/auto/network/support/modules/network_test_server/files/init/danted70
-rwxr-xr-xtests/auto/network/support/modules/network_test_server/files/init/danted-authenticating70
-rwxr-xr-xtests/auto/network/support/modules/network_test_server/files/init/frox89
-rwxr-xr-xtests/auto/network/support/modules/network_test_server/files/init/rc.local18
-rw-r--r--tests/auto/network/support/modules/network_test_server/files/init/squid3-authenticating-ntlm.conf63
5 files changed, 310 insertions, 0 deletions
diff --git a/tests/auto/network/support/modules/network_test_server/files/init/danted b/tests/auto/network/support/modules/network_test_server/files/init/danted
new file mode 100755
index 0000000000..026e56e682
--- /dev/null
+++ b/tests/auto/network/support/modules/network_test_server/files/init/danted
@@ -0,0 +1,70 @@
+#! /bin/sh
+#
+# dante SOCKS server init.d file. Based on /etc/init.d/skeleton:
+# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/danted
+NAME=$(basename $0) # may be `danted', `danted-authenticating', etc. Note: In boot it's 'S20danted' etc.
+DESC="Dante SOCKS daemon"
+PIDFILE=/var/run/qt_danted.pid
+CONFFILE=/etc/danted.conf
+
+test -f $DAEMON || exit 0
+test -f $CONFFILE || { echo "error: $CONFFILE does not exist" 1>&2; exit 2; }
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --startas $DAEMON --make-pidfile --background \
+ -- -f $CONFFILE
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
+ echo "$NAME."
+ ;;
+ reload|force-reload)
+ echo "Reloading $DESC configuration files."
+ start-stop-daemon --stop --signal 1 --quiet --pidfile \
+ $PIDFILE
+ ;;
+ restart)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE || :
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --startas $DAEMON --make-pidfile --background \
+ -- -f $CONFFILE
+ echo "$NAME."
+ ;;
+
+ status)
+ echo -n "Showing status of $DESC: "
+ if [ -f $PIDFILE ]; then
+ PID=`cat $PIDFILE`
+ if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
+ printf "%s\n" "Process dead but pidfile exists"
+ exit 1
+ else
+ echo "Running"
+ exit 0
+ fi
+ else
+ printf "%s\n" "Service not running"
+ exit 1
+ fi
+ ;;
+ *)
+ N=/etc/init.d/danted
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/tests/auto/network/support/modules/network_test_server/files/init/danted-authenticating b/tests/auto/network/support/modules/network_test_server/files/init/danted-authenticating
new file mode 100755
index 0000000000..9f9084c337
--- /dev/null
+++ b/tests/auto/network/support/modules/network_test_server/files/init/danted-authenticating
@@ -0,0 +1,70 @@
+#! /bin/sh
+#
+# dante SOCKS server init.d file. Based on /etc/init.d/skeleton:
+# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/danted
+NAME=$(basename $0) # may be `danted', `danted-authenticating', etc. Note: In boot it's 'S20danted-authenticating' etc.
+DESC="Dante SOCKS daemon"
+PIDFILE=/var/run/qt_danted-authenticating.pid
+CONFFILE=/etc/danted-authenticating.conf
+
+test -f $DAEMON || exit 0
+test -f $CONFFILE || { echo "error: $CONFFILE does not exist" 1>&2; exit 2; }
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --startas $DAEMON --make-pidfile --background \
+ -- -f $CONFFILE
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
+ echo "$NAME."
+ ;;
+ reload|force-reload)
+ echo "Reloading $DESC configuration files."
+ start-stop-daemon --stop --signal 1 --quiet --pidfile \
+ $PIDFILE
+ ;;
+ restart)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE || :
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --startas $DAEMON --make-pidfile --background \
+ -- -f $CONFFILE
+ echo "$NAME."
+ ;;
+
+ status)
+ echo -n "Showing status of $DESC: "
+ if [ -f $PIDFILE ]; then
+ PID=`cat $PIDFILE`
+ if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
+ printf "%s\n" "Process dead but pidfile exists"
+ exit 1
+ else
+ echo "Running"
+ exit 0
+ fi
+ else
+ printf "%s\n" "Service not running"
+ exit 1
+ fi
+ ;;
+ *)
+ N=/etc/init.d/danted-authenticating
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/tests/auto/network/support/modules/network_test_server/files/init/frox b/tests/auto/network/support/modules/network_test_server/files/init/frox
new file mode 100755
index 0000000000..d811a7cdb2
--- /dev/null
+++ b/tests/auto/network/support/modules/network_test_server/files/init/frox
@@ -0,0 +1,89 @@
+#! /bin/sh
+
+### BEGIN INIT INFO
+# Provides: frox
+# Required-Start: $syslog
+# Required-Stop: $syslog
+# Should-Start: $local_fs $network
+# Should-Stop: $local_fs $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Handles the frox daemon
+# Description: Starts, stops and reloads configuration of
+# the frox FTP proxy.
+### END INIT INFO
+
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/local/sbin/frox
+NAME=frox
+DESC="frox: caching ftp proxy server"
+PIDFILE=/var/run/$NAME.pid
+
+# This value is overriden in /etc/default/frox if it exists
+RUN_DAEMON=no
+
+test -f $DAEMON || exit 0
+
+set -e
+
+# Get configuration
+if [ -r /etc/default/frox ]; then
+ . /etc/default/frox
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ if [ "$RUN_DAEMON" = "yes" ]; then
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec $DAEMON
+ echo done
+ else
+ echo disabled
+ fi
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
+ --exec $DAEMON
+ echo done
+ ;;
+ reload|force-reload)
+ echo "Reloading $DESC configuration files."
+ start-stop-daemon --stop --oknodo --signal 1 --quiet --exec $DAEMON
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --oknodo --quiet --pidfile \
+ $PIDFILE --exec $DAEMON
+ sleep 1
+ start-stop-daemon --start --quiet --pidfile \
+ $PIDFILE --exec $DAEMON
+ echo "$NAME."
+ ;;
+ status)
+ echo -n "Showing status of $DESC: "
+ if [ -f $PIDFILE ]; then
+ PID=`cat $PIDFILE`
+ if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
+ printf "%s\n" "Process dead but pidfile exists"
+ exit 1
+ else
+ echo "Running"
+ exit 0
+ fi
+ else
+ printf "%s\n" "Service not running"
+ exit 1
+ fi
+ ;;
+
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/tests/auto/network/support/modules/network_test_server/files/init/rc.local b/tests/auto/network/support/modules/network_test_server/files/init/rc.local
new file mode 100755
index 0000000000..66ce0a41a8
--- /dev/null
+++ b/tests/auto/network/support/modules/network_test_server/files/init/rc.local
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+# This file is maintained by puppet
+# Do not edit this file manually, your changes will be discarded!
+#
+# rc.local
+#
+# This script is executed at the end of each multiuser runlevel.
+# Make sure that the script will "exit 0" on success or any other
+# value on error.
+#
+# In order to enable or disable this script just change the execution
+# bits.
+#
+
+# Load iptables
+/sbin/iptables-restore < /home/qt-test-server/iptables
+
+exit 0
diff --git a/tests/auto/network/support/modules/network_test_server/files/init/squid3-authenticating-ntlm.conf b/tests/auto/network/support/modules/network_test_server/files/init/squid3-authenticating-ntlm.conf
new file mode 100644
index 0000000000..426a7d66bb
--- /dev/null
+++ b/tests/auto/network/support/modules/network_test_server/files/init/squid3-authenticating-ntlm.conf
@@ -0,0 +1,63 @@
+# squid - SQUID HTTP proxy-cache
+#
+
+description "HTTP proxy-cache"
+author "Chuck Short <zulcss@ubuntu.com>"
+
+# The second "or" condition is to start squid in case it failed to start
+# because no real interface was there.
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+respawn
+normal exit 0
+
+env CONFIG="/etc/squid3/squid-authenticating-ntlm.conf"
+env SQUID_ARGS="-YC"
+
+pre-start script
+ if [ -f /etc/default/squid3 ]; then
+ . /etc/default/squid3
+ fi
+
+ find_cache_dir () {
+ w=" " # space tab
+ res=`sed -ne '
+ s/^'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
+ t end;
+ d;
+ :end q' < $CONFIG`
+ [ -n "$res" ] || res=$2
+ echo "$res"
+ }
+
+ find_cache_type () {
+ w=" " # space tab
+ res=`sed -ne '
+ s/^'$1'['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
+ t end;
+ d;
+ :end q' < $CONFIG`
+ [ -n "$res" ] || res=$2
+ echo "$res"
+ }
+
+ cache_dir=`find_cache_dir cache_dir`
+ cache_type=`find_cache_type cache_dir`
+
+ if [ "$cache_type" = "coss" -a -d "$cache_dir" -a ! -f "$cache_dir/stripe" ] ||
+ [ "$cache_type" != "coss" -a -d "$cache_dir" -a ! -d "$cache_dir/00" ]
+ then
+ /usr/sbin/squid3 $SQUID_ARGS -z -f $CONFIG
+ fi
+end script
+
+script
+ if [ -f /etc/default/squid3 ]; then
+ . /etc/default/squid3
+ fi
+
+ umask 027
+ ulimit -n 65535
+ exec /usr/sbin/squid3 -N $SQUID_ARGS -f $CONFIG
+end script