/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: Björn Påhlsson
  • Date: 2011-12-26 15:23:45 UTC
  • Revision ID: belorn@recompile.se-20111226152345-cd9mz98e7eiqbfbx
nicer stacktrace when mandos-monitor fail during startup

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
# configuration file(s) should be copied into the
7
7
# /etc/mandos/network-hooks.d directory.
8
8
9
 
# Copyright © 2012 Teddy Hogeborn
10
 
# Copyright © 2012 Björn Påhlsson
11
 
12
9
# Copying and distribution of this file, with or without modification,
13
10
# are permitted in any medium without royalty provided the copyright
14
11
# notice and this notice are preserved.  This file is offered as-is,
19
16
CONFIG="openvpn.conf"
20
17
 
21
18
# Extract the "dev" setting from the config file
22
 
VPNDEVICE=`sed -n -e 's/[[:space:]]#.*//' \
23
 
    -e 's/^[[:space:]]*dev[[:space:]]\+//p' \
24
 
    "$MANDOSNETHOOKDIR/$CONFIG"`
 
19
VPNDEVICE="`sed -n -e 's/#.*//' -e 's/^[[:space:]]*dev[[:space:]]\+//p' \"$MANDOSNETHOOKDIR/$CONFIG\"`"
25
20
 
26
21
PIDFILE=/run/openvpn-mandos.pid
27
22
 
39
34
 
40
35
case "$1" in
41
36
    start)
42
 
        "$openvpn" --cd "$MANDOSNETHOOKDIR" \
43
 
            --daemon 'openvpn(Mandos)' --writepid "$PIDFILE" \
44
 
            --config "$CONFIG"
 
37
        "$openvpn" --cd "$MANDOSNETHOOKDIR" --daemon 'openvpn(Mandos)' --writepid "$PIDFILE" --config "$CONFIG"
45
38
        sleep "$DELAY"
46
39
        ;;
47
40
    stop)