mirror of
https://github.com/webmin/webmin.git
synced 2026-02-07 07:52:13 +00:00
25 lines
721 B
Perl
Executable File
25 lines
721 B
Perl
Executable File
#!/usr/local/bin/perl
|
|
# shutdown.cgi
|
|
# Shutdown the system immediately..
|
|
|
|
require './init-lib.pl';
|
|
&ReadParse();
|
|
$access{'shutdown'} || &error($text{'shutdown_ecannot'});
|
|
&ui_print_header(undef, $text{'shutdown_title'}, "");
|
|
print "<p>\n";
|
|
$ttcmd = "<tt>$config{'shutdown_command'}</tt>";
|
|
if ($in{'confirm'}) {
|
|
print "<font size=+1>",&text('shutdown_exec', $ttcmd),"</font><p>\n";
|
|
&shutdown_system();
|
|
&webmin_log("shutdown");
|
|
}
|
|
else {
|
|
print "<font size=+1>",&text('shutdown_rusure', $ttcmd),"</font>\n";
|
|
print "<center><form action=shutdown.cgi>\n";
|
|
print "<input type=submit value=\"$text{'shutdown_ok'}\" ",
|
|
"name=confirm>\n";
|
|
print "</form></center>\n";
|
|
}
|
|
&ui_print_footer("", $text{'index_return'});
|
|
|