+autologin=Login mode,1,0-Prompt for username and password,1-Open root shell
timeout=Idle timeout before closing connection,0,5,,seconds
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);
}
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+)(.*)$/ ||
&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);
}