--- trunk/openvpn/openvpn.rc 2007/09/28 16:05:44 366 +++ trunk/openvpn/openvpn.rc 2009/12/01 17:36:15 944 @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /root/magellan-cvs/src/openvpn/openvpn.rc,v 1.1 2007-09-28 16:05:44 niro Exp $ +# $Header: /root/magellan-cvs/src/openvpn/openvpn.rc,v 1.2 2009-12-01 17:36:15 niro Exp $ #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k #%start: 24 @@ -10,7 +10,7 @@ #%before: #%after: -source /etc/sysconfig/rc +source /etc/conf.d/rc source $rc_functions # Lockfile @@ -29,7 +29,7 @@ # load neccessary tun module modprobe tun >/dev/null 2>&1 - # Run startup script, if defined + # run startup script, if defined if [ -x ${configdir}/opnvpn-startup ] then echo " Running startup script ... " @@ -40,7 +40,7 @@ rm -f ${piddir}/*.pid - # Start every .conf in /etc/openvpn and run .sh if exists + # start every .conf in /etc/openvpn and run .sh if exists for config in ${configdir}/*.conf do echo " Starting server for ${config} ... " @@ -66,7 +66,7 @@ update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; - + stop) echo -e ${COLOREDSTAR}"Stopping OpenVPN:" @@ -79,7 +79,7 @@ evaluate_retval done - # Run shutdown script, if defined + # run shutdown script, if defined if [[ -x ${configdir}/openvpn-shutdown ]] then echo " Running shutdown script ... " @@ -90,13 +90,13 @@ update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; - + restart) $0 stop sleep 2 $0 start ;; - + reload) for pidfile in ${piddir}/*.pid do @@ -107,7 +107,7 @@ evaluate_retval done ;; - + reopen) for pidfile in ${piddir}/*.pid do @@ -118,11 +118,11 @@ evaluate_retval done ;; - + status) statusproc /usr/sbin/openvpn ;; - + *) echo "Usage: openvpn {start|stop|restart|reload|reopen|status}" exit 1