summaryrefslogtreecommitdiff
path: root/debian/openvpn.if-down.d
diff options
context:
space:
mode:
Diffstat (limited to 'debian/openvpn.if-down.d')
-rw-r--r--debian/openvpn.if-down.d3
1 files changed, 2 insertions, 1 deletions
diff --git a/debian/openvpn.if-down.d b/debian/openvpn.if-down.d
index 77cfb79..61b8476 100644
--- a/debian/openvpn.if-down.d
+++ b/debian/openvpn.if-down.d
@@ -3,6 +3,7 @@
OPENVPN=/usr/sbin/openvpn
OPENVPN_INIT=/etc/init.d/openvpn
SYSTEMCTL=/bin/systemctl
+SYSTEMD=/run/systemd/system
if [ ! -x $OPENVPN ]; then
exit 0
@@ -11,7 +12,7 @@ fi
if [ -n "$IF_OPENVPN" ]; then
for vpn in $IF_OPENVPN; do
## check systemd present
- if [ -x $SYSTEMCTL ]; then
+ if [ -d $SYSTEMD ]; then
$SYSTEMCTL stop openvpn@$vpn
else
$OPENVPN_INIT stop $vpn