summaryrefslogtreecommitdiff
path: root/debian/openvpn.init.d
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2014-03-17 18:17:01 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2014-03-17 18:17:01 +0100
commit263a36ccf900dabf288e3050e2226cc7be6f38cd (patch)
treee443c617f1fdd84c105a0cf795b5e34bebc73dce /debian/openvpn.init.d
parentd94d10b7a7ceb5367367886eaaf845de6ec8ecee (diff)
Fix systemd issues
Diffstat (limited to 'debian/openvpn.init.d')
-rw-r--r--debian/openvpn.init.d7
1 files changed, 5 insertions, 2 deletions
diff --git a/debian/openvpn.init.d b/debian/openvpn.init.d
index e465c85..8507ace 100644
--- a/debian/openvpn.init.d
+++ b/debian/openvpn.init.d
@@ -58,8 +58,6 @@ start_vpn () {
STATUSARG="--status /run/openvpn/$NAME.status $STATUSREFRESH"
fi
- mkdir -p /run/openvpn
-
# tun using the "subnet" topology confuses the routing code that wrongly
# emits ICMP redirects for client to client communications
SAVED_DEFAULT_SEND_REDIRECTS=0
@@ -110,6 +108,11 @@ case "$1" in
start)
log_daemon_msg "Starting $DESC"
+ # first create /run directory so it's present even
+ # when no VPN are autostarted by this script, but later
+ # by systemd openvpn@.service
+ mkdir -p /run/openvpn
+
# autostart VPNs
if test -z "$2" ; then
# check if automatic startup is disabled by AUTOSTART=none