The Debian package has already a init.d script. Did you take a look at it? Yours doesn't improve it in any visible way, so, what's the point? Please take a look at the debian package (use backports.org if you're using Debian woody) and feel free to send me improvements.
Regards, Alberto On Fri, Dec 03, 2004 at 09:24:57AM +0300, ??????? ????????? wrote: > Hello, OpenVPN developers! > > I was advised to send you this shell, and I hope this can be helpful > > Afanasyev Nikolay > afanasye...@unc.ru > > > > -----Original Message----- > > From: James Yonan [mailto:j...@yonan.net] > > Sent: Thursday, December 02, 2004 7:21 PM > > To: ??????? ????????? > > Subject: Re: Init script/Debian for OpenVPN > > > > Thanks for your contribution. > > > > It would be best if you send it to openvpn-devel@lists.sourceforge.net > > > > Thanks, > > James > > > > On Thu, 2 Dec 2004, [koi8-r] ??????? ????????? wrote: > > > > > Hello, James > > > Can I contribute a little to your project? I have init > > script for Debian GNU Linux that I wrote for OpenVPN: > > > > > > PS: sorry bout permissions 8-) > > > > > > >>>>>>>>>>>> Start openvpn.sh >>>>>>>>>>>>>>>>>> > > #!/bin/sh > > DAEMON="/usr/local/sbin/openvpn" > piddir="/var/run/openvpn" > work=/etc/openvpn > export LANG=C > export PATH > > test -f $DAEMON || exit 0 > > > > case "$1" in > start) > cd $work > # Start every .conf in $work and run .sh if exists > for c in `/bin/ls *.conf 2>/dev/null`; do > bn=${c%%.conf} > echo -n "Starting OpenVPN whith config $c" > args="--daemon --writepid $piddir/$bn.pid --config $c --cd $work" > start-stop-daemon --start --pidfile $piddir/$bn.pid --exec $DAEMON -- > $args > if [ $? == 0 ]; then > echo " [OK]" > else > echo " [failed]" > fi > done > ;; > > stop) > for pidf in `/bin/ls $piddir/*.pid 2>/dev/null`; do > if [ -s $pidf ]; then > echo -n "Shuttin' down OpenVPN whith PID file $pidf" > start-stop-daemon --stop --pidfile $pidf --oknodo --exec $DAEMON > if [ $? == 0 ]; then > echo " [OK]" > else > echo " [failed]" > fi > rm -f $pidf > fi > done > ;; > > reload) > for pidf in `/bin/ls $piddir/*.pid 2>/dev/null`; do > if [ -s $pidf ]; then > echo -n "Reload OpenVPN whith PID file $pidf" > start-stop-daemon --stop --pidfile $pidf --signal USR1 --exec $DAEMON > > if [ $? == 0 ]; then > echo " [OK]" > else > echo " [failed]" > fi > fi > done > ;; > > restart) > $0 stop > $0 start > exit $? > ;; > > *) > echo "Usage: $0 {start|stop|reload|restart}" > exit 1 > ;; > esac > > if [ $? == 0 ]; then > exit 0 > else > exit 1 > fi > > > > > <<<<<<<<<<<< End openvpn.sh <<<<<<<<<<<<<<<<<< > > > > > > > > > > > > > > > Afanasyev Nikolay > > > afanasye...@unc.ru > > > > > > > > > > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel -- Alberto Gonzalez Iniesta | Formación, consultoría y soporte técnico agi@(inittab.org|debian.org)| en GNU/Linux y software libre Encrypted mail preferred | http://inittab.org Key fingerprint = 9782 04E7 2B75 405C F5E9 0C81 C514 AF8E 4BA4 01C3