]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
backup.pl: Restart openvpn daemons after restore.
authorAdolf Belka <adolf.belka@ipfire.org>
Sat, 23 Aug 2025 13:46:09 +0000 (15:46 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 23 Aug 2025 14:56:54 +0000 (14:56 +0000)
- As the daemons are running when the restore is done then if the daemons are not
   restarted the running daemon stays with the previous config and not with the restored
   version.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/backup/backup.pl

index c9bc14355153f81adab5ee552d0da5ad62c9d8ff..e79f510c67bb43e2f580d600cf5c4bf91d118063 100644 (file)
@@ -349,8 +349,10 @@ restore_backup() {
                rm /var/log/pakfire.log
        fi
 
-       # Update the OpenVPN configuration
+       # Update the OpenVPN configuration and restart the openvpn daemons
        sudo -u nobody /srv/web/ipfire/cgi-bin/ovpnmain.cgi
+       /etc/init.d/openvpn-n2n restart
+       /etc/init.d/openvpn-rw restart
 
        return 0
 }