/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to network-hooks.d/openvpn

  • Committer: Teddy Hogeborn
  • Date: 2011-12-31 20:07:11 UTC
  • mfrom: (535.1.9 wireless-network-hook)
  • Revision ID: teddy@recompile.se-20111231200711-6dli3r8drftem57r
Merge new wireless network hook.  Fix bridge network hook to use
hardware addresses instead of interface names.  Implement and document
new "CONNECT" environment variable for network hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
CONFIG="openvpn.conf"
17
17
 
18
18
# Extract the "dev" setting from the config file
19
 
VPNDEVICE="`sed -n -e 's/#.*//' -e 's/^[[:space:]]*dev[[:space:]]\+//p' \"$MANDOSNETHOOKDIR/$CONFIG\"`"
 
19
VPNDEVICE=`sed -n -e 's/[[:space:]]#.*//' \
 
20
    -e 's/^[[:space:]]*dev[[:space:]]\+//p' \
 
21
    "$MANDOSNETHOOKDIR/$CONFIG"`
20
22
 
21
23
PIDFILE=/run/openvpn-mandos.pid
22
24
 
34
36
 
35
37
case "$1" in
36
38
    start)
37
 
        "$openvpn" --cd "$MANDOSNETHOOKDIR" --daemon 'openvpn(Mandos)' --writepid "$PIDFILE" --config "$CONFIG"
 
39
        "$openvpn" --cd "$MANDOSNETHOOKDIR" \
 
40
            --daemon 'openvpn(Mandos)' --writepid "$PIDFILE" \
 
41
            --config "$CONFIG"
38
42
        sleep "$DELAY"
39
43
        ;;
40
44
    stop)