]> git.pld-linux.org Git - packages/frottle.git/commitdiff
- new
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 1 Jun 2004 12:46:11 +0000 (12:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    frottle.init -> 1.1
    frottle.sysconfig -> 1.1

frottle.init [new file with mode: 0644]
frottle.sysconfig [new file with mode: 0644]

diff --git a/frottle.init b/frottle.init
new file mode 100644 (file)
index 0000000..9d4cc7d
--- /dev/null
@@ -0,0 +1,90 @@
+#!/bin/sh
+#
+# vtun         Script for starting and stoping vtund.
+#
+# chkconfig:   345 55 45
+# description: vtund Virtual Tunnel Daemon. \
+#              VTun provides the method for creating Virtual Tunnels over \
+#              TCP/IP networks and allows to shape, compress, encrypt \
+#              traffic in that tunnels.
+
+# 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 Vtund
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+# Get service config
+[ -f /etc/sysconfig/vtun ] && . /etc/sysconfig/vtun
+
+err_exit() {
+       echo @$
+       exit 1
+}
+
+[ -n "$VTUND_MODE" ] || err_exit "VTUND_MODE not set"
+
+VTUND_OPTS="$VTUND_OPTS -f $VTUND_CONF"
+
+if [ $VTUND_MODE = "server" ]; then
+       VTUND_OPTS="$VTUND_OPTS -s"
+
+elif [ $VTUND_MODE = "client" ]; then
+       [ -n "$VTUND_SESSION" ] || err_exit "VTUND_SESSION not set"
+       [ -n "$VTUND_SERVER_ADDR" ] || err_exit "VTUND_SERVER_ADDR not set"
+       [ -n "$VTUND_PORT" ] && VTUND_OPTS="$VTUND_OPTS -P $VTUND_PORT"
+       VTUND_OPTS="$VTUND_OPTS $VTUND_SESSION $VTUND_SERVER_ADDR"
+
+else 
+       err_exit "Invalid VTUND_MODE ($VTUND_MODE), should be set to \"server\" or \"client\""
+fi
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/vtund ]; then
+               msg_starting Vtund
+               daemon vtund $VTUND_OPTS
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vtund
+       else
+               msg_already_running Vtund
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/vtund ]; then
+               # Stop daemons.
+               msg_stopping Vtund
+               killproc vtund
+               rm -f /var/lock/subsys/vtund >/dev/null 2>&1
+       else
+               msg_not_running Vtund
+       fi
+       ;;
+  restart|force-reload)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  status)
+       status vtund
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/frottle.sysconfig b/frottle.sysconfig
new file mode 100644 (file)
index 0000000..a50b18e
--- /dev/null
@@ -0,0 +1,5 @@
+# Customized setings
+
+# Nice level 
+SERVICE_RUN_NICE_LEVEL="+5"
+
This page took 0.065168 seconds and 4 git commands to generate.