]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
openvpn: Ignore existing PID files when starting processes openvpn-rebase
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 8 Jul 2025 08:49:47 +0000 (10:49 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 8 Jul 2025 08:49:47 +0000 (10:49 +0200)
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 <michael.tremer@ipfire.org>
src/initscripts/system/openvpn-n2n
src/initscripts/system/openvpn-rw

index 6d5e66578eb11e5df62455279a5b3f70abfc8782..4d55f4cbd5243f3409840cb50ed09fc387485ee2 100644 (file)
@@ -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() {
index a7fa6cae06a3fd6c97baf7ee1fb80761535da197..56a62d71cc87213043063c7f5d0f4c6f82622f72 100644 (file)
@@ -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..."