#!/bin/sh # # Script for starting and stoping vtund. # # Writen by Dag Wieers <dag@mind.be>. # Mandrake version by Olivier Thauvin <thauvin@aerov.jussieu.fr> # # 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. # This is the client part # Source function library. . /etc/rc.d/init.d/functions . /etc/sysconfig/network [ "$NETWORKING" != "yes" ] && exit 0 if [ -f /etc/sysconfig/vtunc ] ; then . /etc/sysconfig/vtunc else exit 0 fi start_vtun () { [ -n "$PORT" ] && ARG="${ARG} -P $PORT" [ -n "$CONFFILE" ] && ARG="${ARG} -f $CONFFILE" ARG="${ARG} $TUNNEL $IPSERVER" gprintf "Starting vtund: " daemon vtund -p $ARG echo touch /var/lock/subsys/vtunc } stop_vtun () { gprintf "Stopping vtund: " killproc vtund echo rm -f /var/lock/subsys/vtunc } # See how we were called. case "$1" in start) start_vtun ;; stop) stop_vtun ;; restart|reload) stop_vtun start_vtun ;; status) status vtund ;; *) gprintf "Usage: vtunc {start|stop|restart|status}\n" exit 1 esac exit 0