mirror of
https://github.com/webmin/webmin.git
synced 2026-09-19 12:00:46 +01:00
Add option to login immediately, reduce latency by simplifying proxy.cgi
This commit is contained in:
@@ -1 +1,2 @@
|
||||
autologin=0
|
||||
timeout=120
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
autologin=Login mode,1,0-Prompt for username and password,1-Open root shell
|
||||
timeout=Idle timeout before closing connection,0,5,,seconds
|
||||
|
||||
@@ -36,7 +36,10 @@ if (!$pid) {
|
||||
untie(*STDIN); open(STDIN, "</dev/null");
|
||||
untie(*STDOUT); open(STDOUT, ">$logfile");
|
||||
untie(*STDERR); open(STDERR, ">$logfile");
|
||||
exec($python, "ajaxterm.py", "--port", $port, "--log");
|
||||
$shell = &has_command("bash") ||
|
||||
&has_command("sh") || "/bin/sh";
|
||||
exec($python, "ajaxterm.py", "--port", $port, "--log",
|
||||
$config{'autologin'} ? ("--command", $shell) : ( ));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
|
||||
BEGIN { push(@INC, ".."); };
|
||||
use WebminCore;
|
||||
&init_config();
|
||||
|
||||
# Since this script is run on every keypress, init_config is intentionally
|
||||
# not called to reduce startup time.
|
||||
#&init_config();
|
||||
|
||||
# Parse out port
|
||||
$ENV{'PATH_INFO'} =~ /^\/(\d+)(.*)$/ ||
|
||||
@@ -46,7 +49,7 @@ while($buf = &read_http_connection($con, 1024)) {
|
||||
&close_http_connection($con);
|
||||
|
||||
# Touch status file to indicate it is still running
|
||||
$statusdir = $ENV{'WEBMIN_VAR'}."/".$module_name;
|
||||
$statusdir = $ENV{'WEBMIN_VAR'}."/ajaxterm";
|
||||
if (!-d $statusdir) {
|
||||
&make_dir($statusdir, 0700);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user