3 # description: Starts and stops the AICCU daemon
5 # aiccu: Starts and stops the AICCU daemon
6 # description: hearbeat daemon for IPv6-in-IPv4 (Proto-41, AYIYA, Heartbeat) tunnels
7 # pidfile: /var/run/aiccu.pid
8 # config: /etc/aiccu.conf
12 # Source function library.
13 if [ -f /etc/init.d/functions ] ; then
14 . /etc/init.d/functions
15 elif [ -f /etc/rc.d/init.d/functions ] ; then
16 . /etc/rc.d/init.d/functions
21 # Avoid using root's TMPDIR
24 # Source networking configuration.
25 . /etc/sysconfig/network
30 if [ -f /etc/sysconfig/aiccu ]; then
31 . /etc/sysconfig/aiccu
34 # Check that networking is up.
35 [ ${NETWORKING} = "no" ] && exit 0
37 # Check that aiccu.conf exists.
38 [ -f /etc/aiccu.conf ] || exit 0
40 # Verify that the configuration is correct
41 if [ `grep -c "^username" /etc/aiccu.conf 2>/dev/null` -ne 1 ]; then
42 echo "AICCU is not configured, edit /etc/aiccu.conf first"
48 KIND="AICCU (Automatic IPv6 Connectivity Configuration Utility)"
51 echo -n $"Starting $KIND services: "
52 daemon aiccu start $OPTIONS
55 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/aiccu || \
61 echo -n $"Shutting down $KIND services: "
65 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/aiccu
97 [ -f /var/lock/subsys/aiccu ] && restart || :
100 echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"