mirror of
https://github.com/webmin/webmin.git
synced 2025-07-25 15:09:18 +00:00
26 lines
472 B
Perl
Executable File
26 lines
472 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
# index.cgi
|
|
# Redirect to default index
|
|
|
|
require './proc-lib.pl';
|
|
if ($config{'default_mode'} ne "last") {
|
|
$idx = "index_$config{'default_mode'}.cgi";
|
|
}
|
|
elsif (open(INDEX, "<$index_file")) {
|
|
chop($idx = <INDEX>);
|
|
close(INDEX);
|
|
if (!$idx) {
|
|
$idx = "index_tree.cgi";
|
|
}
|
|
}
|
|
else {
|
|
$idx = "index_tree.cgi";
|
|
}
|
|
($idxfn = $idx) =~ s/\?.*$//;
|
|
if (!-r "$module_root_directory/$idxfn") {
|
|
# Bogus index
|
|
$idx = "index_tree.cgi";
|
|
}
|
|
&redirect($idx);
|
|
|