I also came across this issue.
This is a not quite obvious thing in the default installation (I mean the 
@-services).

As far as I could get it (and found in internets), the service relies on the 
init-script:
/etc/init.d/openvpn

which only starts the found .conf files if the AUTOSTART var = "all":
    if test -z "$AUTOSTART" -o "x$AUTOSTART" = "xall" ; then
      # all VPNs shall be started automatically
      for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
        NAME=${CONFIG%%.conf}
        start_vpn
      done

BUT /etc/default/openvpn has this:
#AUTOSTART="all"
#AUTOSTART="none"

The AUTOSTART is not defined anywhere. Fix me if I'm wrong.

In order to fix it as much closer to "default options" as possible, I
installed from the OpenVPN repo, which (surpsise) has this in the init-
script:

===
# Source defaults file; edit that file to configure this script.
AUTOSTART="all"
STATUSREFRESH=10
OMIT_SENDSIGS=0
if test -e /etc/default/openvpn ; then
  . /etc/default/openvpn
fi
===

So this var is actually pre-defined, according to the "defaults"-file
description (see below).

I'd actually really call it a bug, since the "defaults" file contains:
# Start only these VPNs automatically via init script.
# Allowed values are "all", "none" or space separated list of
# names of the VPNs. If empty, "all" is assumed.

The last sentence..

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1771650

Title:
  openvpn startup script isn't working in ubuntu 18.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/1771650/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to