]> git.pld-linux.org Git - packages/openvpn.git/blame - openvpn.upstart
- up to 2.4.0
[packages/openvpn.git] / openvpn.upstart
CommitLineData
5cab2349
ER
1description "Start the OpenVPN tunnels"
2
3start on pld.network-started
4stop on pld.network-stopped
5
6task
7console output
8
9script
10 [ -f /etc/sysconfig/openvpn ] && . /etc/sysconfig/openvpn
11
12 for tun in $TUNNELS; do
13 if [ ! -f "/etc/openvpn/$tun.conf" ]; then
14 # skip invalid tunnels
15 continue
16 fi
17
18 initctl start openvpn-tunnel TUNNEL=$tun >/dev/null || :
19 done
20end script
21
22pre-stop script
23 [ -f /etc/sysconfig/openvpn ] && . /etc/sysconfig/openvpn
24
25 for tun in $TUNNELS; do
26 if [ ! -f "/etc/openvpn/$tun.conf" ]; then
27 # skip invalid tunnels
28 continue
29 fi
30
31 initctl stop openvpn-tunnel TUNNEL=$tun >/dev/null || :
32 done
33end script
This page took 0.028945 seconds and 4 git commands to generate.