From: Michael Tremer Date: Tue, 8 Jul 2025 08:49:47 +0000 (+0200) Subject: openvpn: Ignore existing PID files when starting processes X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fopenvpn-rebase;p=people%2Fms%2Fipfire-2.x.git openvpn: Ignore existing PID files when starting processes This is all not very organised and tidy. The init process seems to be too cautious if there is a PID file left but there should not be any harm in trying to start the same process twice when in doubt because after all only one can bind to the same port at a time. Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/system/openvpn-n2n b/src/initscripts/system/openvpn-n2n index 6d5e66578..4d55f4cbd 100644 --- a/src/initscripts/system/openvpn-n2n +++ b/src/initscripts/system/openvpn-n2n @@ -257,7 +257,7 @@ start() { boot_mesg "Starting OpenVPN N2N connection '${name}'..." PIDFILE="/var/run/${name}n2n.pid" \ - loadproc /usr/sbin/openvpn --config "${config}" + loadproc -f /usr/sbin/openvpn --config "${config}" } stop() { diff --git a/src/initscripts/system/openvpn-rw b/src/initscripts/system/openvpn-rw index a7fa6cae0..56a62d71c 100644 --- a/src/initscripts/system/openvpn-rw +++ b/src/initscripts/system/openvpn-rw @@ -45,7 +45,7 @@ case "${1}" in -p "${DPROTOCOL}" --dport "${DDEST_PORT}" -j ACCEPT boot_mesg "Starting OpenVPN Roadwarrior Server..." - loadproc /usr/sbin/openvpn \ + loadproc -f /usr/sbin/openvpn \ --config /var/ipfire/ovpn/server.conf boot_mesg "Starting OpenVPN Authenticator..."