]> git.pld-linux.org Git - packages/freenet6-client.git/commitdiff
- new file
authordjurban <djurban@pld-linux.org>
Sun, 28 Sep 2003 14:18:15 +0000 (14:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- someone who knows rc-scripts please check it

Changed files:
    freenet6.init -> 1.1

freenet6.init [new file with mode: 0644]

diff --git a/freenet6.init b/freenet6.init
new file mode 100644 (file)
index 0000000..d0d1c1a
--- /dev/null
@@ -0,0 +1,69 @@
+#!/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
This page took 0.077763 seconds and 4 git commands to generate.