Handle hostnames with upper-case letters
[webmin.git] / init / shutdown.cgi
1 #!/usr/local/bin/perl
2 # shutdown.cgi
3 # Shutdown the system immediately..
4
5 require './init-lib.pl';
6 &ReadParse();
7 $access{'shutdown'} || &error($text{'shutdown_ecannot'});
8 &ui_print_header(undef, $text{'shutdown_title'}, "");
9 print "<p>\n";
10 $ttcmd = "<tt>$config{'shutdown_command'}</tt>";
11 if ($in{'confirm'}) {
12         print "<font size=+1>",&text('shutdown_exec', $ttcmd),"</font><p>\n";
13         &shutdown_system();
14         &webmin_log("shutdown");
15         }
16 else {
17         print "<font size=+1>",&text('shutdown_rusure', $ttcmd),"</font>\n";
18         print "<center><form action=shutdown.cgi>\n";
19         print "<input type=submit value=\"$text{'shutdown_ok'}\" ",
20               "name=confirm>\n";
21         print "</form></center>\n";
22         }
23 &ui_print_footer("", $text{'index_return'});
24