To an override file in /etc/systemd/system/openvpn@.service.d. So that when the systemd service for openvpn starts, it first kills any existing openvpn process to make sure there aren't conflicts.
Since I have a workaround, it hasn't been a high priority, and I've been really busy.
I don't have a lot of time to try reproducing without my fix, but here is what I remember of the situation that caused it.
the openvpn configuration looked something like:
```
port 443
proto tcp4
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh.key
topology subnet
server 10.0.0.0 255.255.255.0
push "topology subnet"
push "route-gateway 10.0.0.1"
push "route 10.0.0.0 255.255.255.0"
push "dhcp-option DNS 10.0.0.2"
push "dhcp-option DNS 10.0.0.3"
I'm sorry I haven't been more responsive on this ticket.
To fix my issue I have implemented a workaround where I add
ExecStartPr e=-+start- stop-daemon --stop --oknodo --pidfile /run/openvpn/%i.pid --exec /usr/sbin/openvpn
To an override file in /etc/systemd/ system/ openvpn@ .service. d. So that when the systemd service for openvpn starts, it first kills any existing openvpn process to make sure there aren't conflicts.
Since I have a workaround, it hasn't been a high priority, and I've been really busy.
I don't have a lot of time to try reproducing without my fix, but here is what I remember of the situation that caused it.
the openvpn configuration looked something like:
``` server. crt server. key
port 443
proto tcp4
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/
key /etc/openvpn/
dh /etc/openvpn/dh.key
topology subnet
server 10.0.0.0 255.255.255.0
push "topology subnet"
push "route-gateway 10.0.0.1"
push "route 10.0.0.0 255.255.255.0"
push "dhcp-option DNS 10.0.0.2"
push "dhcp-option DNS 10.0.0.3"
client-connect /etc/openvpn/ client_ connect_ script pass-verify /etc/openvpn/ pass_verify_ script. sh via-env
auth-user-
max-clients 2048
script-security 3
keepalive 10 120
compress lzo
persist-key
persist-tun
```
And I had something that would periodically start the systemd service if it wasn't already started.
Then sometime after installing an update to openvpn, I would endp up with duplicate openvpn processes.