Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20085 - OpenVPN init.d script
Summary: OpenVPN init.d script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Ryan Phillips (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-27 21:31 UTC by Warp Zero (RETIRED)
Modified: 2003-05-20 14:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Warp Zero (RETIRED) gentoo-dev 2003-04-27 21:31:08 UTC
This is a script to start up & shut down multiple openvpn daemons by launching
one daemon per directory in /etc/openvpn . It assumes that the user has made or
symlinked the proper configuration file to /etc/openvpn/$VPN/local.conf.
I did not add the legal or $Header stuff to the beggining of the script.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




#!/sbin/runscript
VPNDIR="/etc/openvpn"

depend() {
	need net
}

start() {
	cd $VPNDIR
	for VPN in *
	do
		ebegin "Starting openvpn for $VPN"
		start-stop-daemon --start --pidfile \
			/var/run/openvpn-$VPN.pid --startas /usr/sbin/openvpn \
			-- --config $VPN/local.conf --writepid \
			/var/run/openvpn-$VPN.pid \
			--daemon --cd $VPN
		eend $?
	done
}

stop() {
	cd $VPNDIR
	for VPN in *
	do
		ebegin "Stoping openvpn for $VPN"
		start-stop-daemon --stop --pidfile /var/run/openvpn-$VPN.pid
		eend $?
	done
}
Comment 1 Ryan Phillips (RETIRED) gentoo-dev 2003-05-20 14:05:54 UTC
committed