SHA256
1
0
forked from pool/openvpn
openvpn/rcopenvpn
Alexandre Vicenzi bd1ac08c0b Accepting request 1174409 from home:bmwiedemann:branches:network:vpn
Enable Data-Channel-Offloading (DCO) for better performance (jsc#PED-8305)
  if libnl >= 3.4 is available

now recommends ovpn-dco kmp

still needs testing

OBS-URL: https://build.opensuse.org/request/show/1174409
OBS-URL: https://build.opensuse.org/package/show/network:vpn/openvpn?expand=0&rev=207
2024-06-14 08:55:43 +00:00

35 lines
535 B
Bash

#! /bin/bash
action=$1 ; shift
config=$1 ; shift
retcode=0
if test -n "$config" ; then
systemctl "${action}" "openvpn@${config}.service" || retcode=$?
else
case $action in
status)
n=0
l=`systemctl show -p ConsistsOf openvpn.target 2>/dev/null`
for s in ${l#ConsistsOf=} ; do
case $s in
openvpn@*.service)
systemctl status "$s" || retcode=$?
((++n))
;;
esac
done
if test $n -eq 0 ; then
echo 'unused' >&2
exit 3
fi
;;
*)
systemctl "${action}" "openvpn.target"
;;
esac
fi
exit $retcode