]> git.pld-linux.org Git - packages/vtun.git/blame - vtun.init
- added using %%{__make} macro.
[packages/vtun.git] / vtun.init
CommitLineData
735a2745 1#!/bin/sh
2#
3# Script for starting and stoping vtund.
4#
5# chkconfig: 345 55 45
6# description: vtund Virtual Tunnel Daemon.
7# VTun provides the method for creating Virtual Tunnels over TCP/IP networks
8# and allows to shape, compress, encrypt traffic in that tunnels.
9
10# Source function library.
11. /etc/rc.d/init.d/functions
12
2f2c96cd 13# Get network config
14. /etc/sysconfig/network
15
16# Check that networking is up.
17if is_no "${NETWORKING}"; then
18 msg_Network_Down Vtund
19 exit 1
20fi
21
735a2745 22# See how we were called.
23case "$1" in
24 start)
2f2c96cd 25 # Check if the service is already running?
26 if [ ! -f /var/lock/subsys/vtund ]; then
27 msg_starting Vtund
28 daemon vtund -s
29 RETVAL=$?
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/vtund
31 else
32 msg_Already_Running Vtund
33 exit 1
34 fi
35
735a2745 36 ;;
37 stop)
2f2c96cd 38 # Stop daemons.
39 if [ -f /var/lock/subsys/vtund ]; then
40 msg_stopping Vtund
41 killproc vtund
42 rm -f /var/lock/subsys/vtund >/dev/null 2>&1
43 else
44 msg_Not_Running Vtund
45 exit 1
46 fi
735a2745 47 ;;
48 restart)
49 $0 stop
50 $0 start
51 ;;
52 status)
53 status vtund
2f2c96cd 54 exit $?
735a2745 55 ;;
56 *)
2f2c96cd 57 msg_Usage "$0 {start|stop|restart|status}"
735a2745 58 exit 1
59esac
60
2f2c96cd 61exit $RETVAL
This page took 0.061073 seconds and 4 git commands to generate.