mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 18:03:06 +02:00
Forward Firewall: edited Backup.pl. If someone put /var/ipfire/outgoing into /var/ipfire/backup/include, the rules are backed up and need to be restored.
Now the backup takes care of this and checks if there are old rules to convert.
This commit is contained in:
committed by
Michael Tremer
parent
8794629653
commit
9edb1d7a8e
@@ -64,13 +64,24 @@ elsif ($ARGV[0] eq 'restore') {
|
||||
system("cd / && tar -xvz -p -f /tmp/restore.ipf");
|
||||
#Here some converter scripts to correct old Backups (before core 65)
|
||||
system("/usr/sbin/ovpn-ccd-convert");
|
||||
if( -d "/var/ipfire/outgoing"){
|
||||
if( -d "${General::swroot}/outgoing"){
|
||||
if( -f "${General::swroot}/forward/config" ){
|
||||
unlink("${General::swroot}/forward/config");
|
||||
system("touch ${General::swroot}/forward/config");
|
||||
chown 99,99,"${General::swroot}/forward/config";
|
||||
}
|
||||
if( -f "${General::swroot}/forward/input" ){
|
||||
unlink("${General::swroot}/forward/input");
|
||||
system("touch ${General::swroot}/forward/input");
|
||||
chown 99,99,"${General::swroot}/forward/input";
|
||||
}
|
||||
system("/usr/sbin/convert-outgoingfw");
|
||||
rmtree("/var/ipfire/outgoing");
|
||||
rmtree("${General::swroot}/outgoing");
|
||||
system("/usr/local/bin/forwrdfwctrl");
|
||||
}
|
||||
if( -d "/var/ipfire/xtaccess"){
|
||||
if( -d "${General::swroot}/xtaccess"){
|
||||
system("/usr/sbin/convert-xtaccess");
|
||||
rmtree("/var/ipfire/xtaccess");
|
||||
rmtree("${General::swroot}/xtaccess");
|
||||
}
|
||||
}
|
||||
elsif ($ARGV[0] eq 'restoreaddon') {
|
||||
|
||||
0
config/forwardfw/convert-outgoingfw
Normal file → Executable file
0
config/forwardfw/convert-outgoingfw
Normal file → Executable file
0
config/forwardfw/convert-xtaccess
Normal file → Executable file
0
config/forwardfw/convert-xtaccess
Normal file → Executable file
Reference in New Issue
Block a user