mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-22 00:42:59 +02:00
Openswan patch fuer Fehler im Realsetup
Remote CGI fuer ssh tempstart fertig kleine Korrektur der sshctrl und syslogdctrl git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@849 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -22,6 +22,7 @@ require "${General::swroot}/header.pl";
|
||||
my %remotesettings=();
|
||||
my %checked=();
|
||||
my $errormessage='';
|
||||
my $counter = 0;
|
||||
|
||||
&Header::showhttpheaders();
|
||||
|
||||
@@ -63,13 +64,16 @@ if ( (($remotesettings{'ACTION'} eq $Lang::tr{'save'}) || ($remotesettings{'ACTI
|
||||
{
|
||||
&General::log($Lang::tr{'ssh1 disabled'});
|
||||
}
|
||||
if ( $remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart15'} ){
|
||||
system('/usr/local/bin/sshctrl','tempstart','900') == 0
|
||||
or $errormessage = "$Lang::tr{'bad return code'} " . $?/256;
|
||||
}
|
||||
elsif ( $remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart30'} ){
|
||||
system('/usr/local/bin/sshctrl','tempstart','1800') == 0
|
||||
or $errormessage = "$Lang::tr{'bad return code'} " . $?/256;
|
||||
if ( $remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart15'} || $remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart30'} ){
|
||||
if ($remotesettings{'ENABLE_SSH'} eq 'off')
|
||||
{
|
||||
system ('/usr/bin/touch', "${General::swroot}/remote/enablessh");
|
||||
system('/usr/local/bin/sshctrl');
|
||||
}
|
||||
if ( $remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart15'} ) { $counter = 900;}
|
||||
elsif ( $remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart30'} ) { $counter = 1800;}
|
||||
|
||||
system("/usr/local/bin/sshctrl tempstart $counter >/dev/null");
|
||||
}
|
||||
else {
|
||||
system('/usr/local/bin/sshctrl') == 0
|
||||
|
||||
Reference in New Issue
Block a user