diff options
author | Steven King <kingrst@gmail.com> | 2014-03-16 23:57:07 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-03-21 13:01:17 -0500 |
commit | 994d31af5d56cfc19181da6e94cd53f32034d796 (patch) | |
tree | fc825fbf74c53b50990f0a32f10d7e6c7d14ea75 /network/aiccu/rc.aiccu | |
parent | 46d257e01bcfc76016a00f005686790d8aa9c580 (diff) | |
download | slackbuilds-994d31af5d56cfc19181da6e94cd53f32034d796.tar.gz |
network/aiccu: Added (Automatic IPv6 Client Utility).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/aiccu/rc.aiccu')
-rw-r--r-- | network/aiccu/rc.aiccu | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/network/aiccu/rc.aiccu b/network/aiccu/rc.aiccu new file mode 100644 index 0000000000..3078f12a01 --- /dev/null +++ b/network/aiccu/rc.aiccu @@ -0,0 +1,53 @@ +#! /bin/sh +# +# /etc/init.d/aiccu: start / stop AICCU +# +# Jeroen Massar <jeroen@sixxs.net> + +NAME=aiccu +DAEMON=/usr/sbin/${NAME} +DESC="SixXS Automatic IPv6 Connectivity Client Utility (${NAME})" + +test -x $DAEMON || exit 1 + +. /etc/init.d/functions + +# Verify that the configuration file exists +if [ ! -f /etc/aiccu.conf ]; then + echo "AICCU Configuration file /etc/aiccu.conf doesn't exist" + exit 1; +fi + +# Verify that the configuration is correct +if [ `grep -c "^username" /etc/aiccu.conf 2>/dev/null` -ne 1 ]; then + echo "AICCU is not configured, edit /etc/aiccu.conf first" + exit 1; +fi + +# Verify that it is in daemonize mode, otherwise it won't ever return +if [ `grep -c "^daemonize true" /etc/aiccu.conf 2>/dev/null` -ne 1 ]; then + echo "AICCU is not configured to daemonize on run" + exit 1; +fi + +case "$1" in + start) + echo "Starting $DESC..." + $DAEMON start /etc/aiccu.conf + ;; + stop) + echo "Stopping $DESC..." + $DAEMON stop /etc/aiccu.conf + ;; + restart|reload|force-reload) + echo "Restarting $DESC..." + $DAEMON stop /etc/aiccu.conf + sleep 2 + $DAEMON start /etc/aiccu.conf + ;; + *) + echo "Usage: /etc/rc.d/rc.$NAME {start|stop|reload|force-reload|restart}" >&2 + exit 1 +esac + +exit 0 |