mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
loxilb UI: save loxilb configuration
save IP/LB/FW configuration from loxilb UI so when loxilb restart or bpfire reboot, the configuration can be restored. Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
@@ -457,13 +457,24 @@ sub manageIP {
|
||||
|
||||
}
|
||||
|
||||
sub SaveIP {
|
||||
my @save_options;
|
||||
my $command = 'loxicmd';
|
||||
my $dir="/var/ipfire/loxilb/";
|
||||
push(@save_options, "save", "--ip", "-c", $dir);
|
||||
&General::system_output($command, @save_options);
|
||||
#my @output = &General::system_output($command, @save_options);
|
||||
#$errormessage = join('', @output);
|
||||
}
|
||||
|
||||
sub CreateIP {
|
||||
my (%settings) = @_;
|
||||
manageIP("create", %settings);
|
||||
&SaveIP;
|
||||
}
|
||||
|
||||
sub DeleteIP {
|
||||
my (%settings) = @_;
|
||||
manageIP("delete", %settings);
|
||||
&SaveIP;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user