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