3 # /etc/init.d/aiccu: start / stop AICCU
5 # Jeroen Massar <jeroen@sixxs.net>
10 # Required-Start: $local_fs $remote_fs $network $time $named
11 # Required-Stop: $local_fs $remote_fs $network $time $named
12 # Default-Start: 2 3 4 5
14 # Short-Description: SixXS Automatic IPv6 Connectivity Client Utility
16 # This client configures IPv6 connectivity without having to
17 # manually configure interfaces etc. A SixXS account or an account
18 # of another supported tunnel broker and at least one tunnel are
19 # required. These can be freely requested from the SixXS website
20 # at no cost. For more information about SixXS check their homepage.
23 PATH
=/sbin
:/bin
:/usr
/sbin
:/usr
/bin
25 DAEMON
=/usr
/sbin
/${NAME}
26 DESC
="SixXS Automatic IPv6 Connectivity Client Utility (${NAME})"
32 test -x $DAEMON ||
exit 0
34 .
/lib
/lsb
/init-functions
36 if [ -f /etc
/default
/${NAME} ]; then
37 .
/etc
/default
/${NAME}
40 # Verify that the configuration file exists
41 if [ ! -f /etc
/aiccu.conf
]; then
42 echo "AICCU Configuration file /etc/aiccu.conf doesn't exist"
46 # Verify that the configuration is correct
47 if [ `grep -c "^username" /etc/aiccu.conf 2>/dev/null` -ne 1 ]; then
48 echo "AICCU is not configured, edit /etc/aiccu.conf first"
52 # Verify that it is in daemonize mode, otherwise it won't ever return
53 if [ `grep -c "^daemonize true" /etc/aiccu.conf 2>/dev/null` -ne 1 ]; then
54 echo "AICCU is not configured to daemonize on run"
58 if [ "$BACKGROUND" = "false" ]; then
64 log_begin_msg
"Starting $DESC..."
65 start-stop-daemon
--start --oknodo --quiet --exec $DAEMON -- start
$OPTIONS
69 log_begin_msg
"Stopping $DESC..."
70 start-stop-daemon
--stop --oknodo --quiet --exec $DAEMON -- stop
73 restart|reload|force-reload
)
74 log_begin_msg
"Restarting $DESC..."
75 start-stop-daemon
--stop --oknodo --quiet --exec $DAEMON -- stop
77 start-stop-daemon
--start --oknodo --quiet --exec $DAEMON -- start
$OPTIONS
81 echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart}" >&2