mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-25 02:12:58 +02:00
Update:
* QoS ist funktionsfig (hoffentlich). * "Aktualisieren" aus Log entfernt. * In der header.pl aufgeraeumt. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@255 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -59,8 +59,7 @@ my %sections = (
|
||||
'kernel' => '(kernel)',
|
||||
'ipsec' => '(ipsec_[\w_]+|pluto\[.*\])',
|
||||
'snort' => '(snort)',
|
||||
'openvpn' => '(openvpnserver)\[.*\]',
|
||||
'installpackage' => '(installpackage\[.*\])'
|
||||
'openvpn' => '(openvpnserver)\[.*\]'
|
||||
);
|
||||
|
||||
# Translations for the %sections array.
|
||||
@@ -76,8 +75,7 @@ my %trsections = (
|
||||
'kernel' => "$Lang::tr{'kernel'}",
|
||||
'ipsec' => 'IPSec',
|
||||
'openvpn' => 'OpenVPN',
|
||||
'snort' => 'Snort',
|
||||
'installpackage' => "$Lang::tr{'update transcript'}"
|
||||
'snort' => 'Snort'
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -324,22 +324,29 @@ END
|
||||
|
||||
if ($qossettings{'ACTION'} eq 'Start')
|
||||
{
|
||||
system("sleep 2 && /usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh &");
|
||||
system("sleep 1 && /usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh &");
|
||||
system("/bin/touch /var/ipfire/qos/enable");
|
||||
system("sleep 2 && /usr/local/bin/qosctrl start >/dev/null 2>&1");
|
||||
system("logger -t ipfire 'QoS started'");
|
||||
$qossettings{'ENABLED'} = 'on';
|
||||
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
|
||||
}
|
||||
elsif ($qossettings{'ACTION'} eq 'Stop')
|
||||
{
|
||||
system("/usr/local/bin/qosctrl stop >/dev/null 2>&1");
|
||||
unlink "/var/ipfire/qos/bin/qos.sh";
|
||||
unlink "/var/ipfire/qos/enable";
|
||||
system("logger -t ipfire 'QoS stopped'");
|
||||
$qossettings{'ENABLED'} = 'off';
|
||||
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
|
||||
}
|
||||
elsif ($qossettings{'ACTION'} eq 'Neustart')
|
||||
{
|
||||
if ($qossettings{'ENABLED'} eq 'on'){
|
||||
system("sleep 2 && /usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh &");
|
||||
system("/usr/local/bin/qosctrl stop >/dev/null 2>&1");
|
||||
system("sleep 1 && /usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh &");
|
||||
system("sleep 5 && /usr/local/bin/qosctrl start >/dev/null 2>&1");
|
||||
system("logger -t ipfire 'QoS restarted'");
|
||||
}
|
||||
}
|
||||
elsif ($qossettings{'ACTION'} eq $Lang::tr{'save'})
|
||||
|
||||
Reference in New Issue
Block a user