# aiccu - SixXS Automatic IPv6 Connectivity Client Utility description "SixXS Automatic IPv6 Connectivity Client Utility" author "Caleb Callaway " start on (local-filesystems and net-device-up IFACE!=lo) stop on runlevel [!2345] emits net-device-up emits net-device-down env BIN=/usr/sbin/aiccu env DESC="SixXS Automatic IPv6 Connectivity Client Utility" env CFG=/etc/aiccu.conf env LOGFILE="/tmp/aiccu.log" pre-start script # read defaults [ -f /etc/default/aiccu ] && . /etc/default/aiccu case "$AICCU_ENABLED" in [Nn]*) exit 0 ;; esac [ -x "$BIN" ] || exit 1 # Verify that the configuration file exists if [ ! -f $CFG ]; then echo "AICCU Configuration file /etc/aiccu.conf doesn't exist" >> $LOGFILE 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" >> $LOGFILE exit 1; fi end script script # read defaults [ -f /etc/default/aiccu ] && . /etc/default/aiccu date >> $LOGFILE # start echo "Starting $DESC aiccu" >> $LOGFILE echo "Command line: $BIN start $DAEMON_ARGS" >> $LOGFILE $BIN start $DAEMON_ARGS >> /tmp/aiccu.log 2>&1 initctl emit -n net-device-up IFACE=sixxs end script pre-stop script echo "Stopping $DESC aiccu" >> $LOGFILE end script post-stop script echo "$DESC aiccu stopped" >> $LOGFILE initctl emit -n net-device-down IFACE=sixxs end script