/mandos/release

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

« back to all changes in this revision

Viewing changes to network-hooks.d/openvpn

* network-hooks.d/openvpn: Tolerate relative MANDOSNETHOOKDIR path.
  (stop): Bug fix: Fix quote escapes.
* network-hooks.d/openvpn.conf: Remove compression.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
set -e
15
15
 
16
 
CONFIG="$MANDOSNETHOOKDIR/openvpn.conf"
 
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' \"$CONFIG\"`"
 
19
VPNDEVICE="`sed -n -e 's/#.*//' -e 's/^[[:space:]]*dev[[:space:]]\+//p' \"$MANDOSNETHOOKDIR/$CONFIG\"`"
20
20
 
21
21
PIDFILE=/run/openvpn-mandos.pid
22
22
 
38
38
        sleep "$DELAY"
39
39
        ;;
40
40
    stop)
41
 
        PID=`cat \"$PIDFILE\"`
 
41
        PID="`cat \"$PIDFILE\"`"
42
42
        if [ "$PID" -gt 0 ]; then
43
43
            kill "$PID"
44
44
        fi