mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-27 04:13:05 +00:00
36 lines
590 B
Perl
Executable file
36 lines
590 B
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
$doChange=0;
|
|
$connections=0;
|
|
|
|
while(<>)
|
|
{
|
|
($key) = ($_ =~ /([^=]*)=(.*)$/);
|
|
($value) = ($_ =~ /^[^=]*=(.*)$/);
|
|
|
|
if( $key eq "LimitDownloads" )
|
|
{
|
|
if ( $value eq "false" )
|
|
{
|
|
$doChange=1;
|
|
}
|
|
print "# DELETE " . $key . "\n";
|
|
next;
|
|
}
|
|
if ( $key eq "MaxConnections" )
|
|
{
|
|
$connections=$value;
|
|
print "# DELETE MaxConnections\n";
|
|
next;
|
|
}
|
|
|
|
print $_;
|
|
}
|
|
|
|
if ( $doChange eq 1 )
|
|
{
|
|
print "MaxConnections=0\n";
|
|
} else {
|
|
print "MaxConnections=" . $connections . "\n";
|
|
}
|
|
|