#!/bin/sh # # freenet6 an ipv6 tunneling service for dynamic ips # # chkconfig: 345 11 89 # # description: unavailable # Source function library . /etc/rc.d/init.d/functions # Get network config . /etc/sysconfig/network # Check that networking is up. if is_yes "${NETWORKING}"; then if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then msg_network_down FREENET6 exit 1 fi else exit 0 fi # Check that IPv6 networking is up. if is_no "${IPV6_NETWORKING}"; then echo "freenet6 needs ipv6 networking" exit 1 fi RETVAL=0 # See how we were called. case "$1" in start) # Check if the service is already running? if [ ! -f /var/lock/subsys/freenet6 ]; then msg_starting freenet6 /usr/sbin/tspc -vf /etc/tspc/tspc.conf RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/freenet6 else msg_already_running freenet6 fi ;; stop) if [ -f /var/lock/subsys/freenet6 ]; then msg_stopping freenet6 killproc tspc rm -f /var/lock/subsys/freenet6 else msg_not_running freenet6 fi ;; restart|force-reload) $0 stop $0 start exit $? ;; status) status freenet6 exit $? ;; *) msg_usage "$0 {start|stop|restart|force-reload|status}" exit 3 esac exit $RETVAL