From: Adolf Belka Date: Tue, 1 Apr 2025 18:08:00 +0000 (+0200) Subject: backup.pl: Fixes bug13737 - restarts ipsec to use the restored certs etc X-Git-Tag: v2.29-core194~13^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fda10e584da6b99237c94aa4e652d97589c7df6;p=ipfire-2.x.git backup.pl: Fixes bug13737 - restarts ipsec to use the restored certs etc - This adds a check if the ipsec server is enabled. If it is then ipsecctrl is run to restart ipsec and ensure that the restored certs are all being used. - Tested this out on my vm testbed and confirmed that with this I could restore a backup and make the client connection as previously set up. - Without this I had to press the Save button on the ipsec WUI page to get the certs etc being used. Fixes: bug13737 Tested-by: Adolf Belka Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer --- diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 1c8c87d0a..a6d1467fd 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -307,6 +307,9 @@ restore_backup() { # start collectd after restore /etc/rc.d/init.d/collectd start + # Reload ipsec certificates and secrets after doing a restore + &General::system('/usr/local/bin/ipsecctrl', 'R'); + return 0 }