#use warnings;
#use CGI::Carp 'fatalsToBrowser';
-require 'CONFIG_ROOT/general-functions.pl';
+require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
$remotesettings{'ACTION'} = '';
&Header::getcgihash(\%remotesettings);
-if ($remotesettings{'ACTION'} eq $Lang::tr{'save'})
+if ( (($remotesettings{'ACTION'} eq $Lang::tr{'save'}) || ($remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart15'}) || ($remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart30'})) && $remotesettings{'ACTION'} ne "" )
{
# not existing here indicates the box is unticked
$remotesettings{'ENABLE_SSH_PASSWORDS'} = 'off' unless exists $remotesettings{'ENABLE_SSH_PASSWORDS'};
{
$errormessage = $Lang::tr{'ssh no auth'};
}
- system ('/bin/touch', "${General::swroot}/remote/enablessh");
+ system ('/usr/bin/touch', "${General::swroot}/remote/enablessh");
}
else
{
{
&General::log($Lang::tr{'ssh1 disabled'});
}
-
+if ( $remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart15'} ){
+ system('/usr/local/bin/restartssh','tempstart15') == 0
+ or $errormessage = "$Lang::tr{'bad return code'} " . $?/256;
+ }
+elsif ( $remotesettings{'ACTION'} eq $Lang::tr{'ssh tempstart30'} ){
+ system('/usr/local/bin/restartssh','tempstart30') == 0
+ or $errormessage = "$Lang::tr{'bad return code'} " . $?/256;
+ }
+else {
system('/usr/local/bin/restartssh') == 0
or $errormessage = "$Lang::tr{'bad return code'} " . $?/256;
+ }
}
&General::readhash("${General::swroot}/remote/settings", \%remotesettings);
<td width='100%' class='base'>$Lang::tr{'ssh keys'}</td>
</tr>
<tr>
- <td colspan='3' align='center'><hr /><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td>
+ <td align='center' colspan='3'><hr />
+ <input type='submit' name='ACTION' value='$Lang::tr{'ssh tempstart15'}' />
+ <input type='submit' name='ACTION' value='$Lang::tr{'ssh tempstart30'}' />
+ <input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td>
</tr>
</table>
END