Handle hostnames with upper-case letters
[webmin.git] / cfengine / stop.cgi
1 #!/usr/local/bin/perl
2 # stop.cgi
3 # Stop the configuration engine daemon
4
5 require './cfengine-lib.pl';
6 &error_setup($text{'stop_err'});
7 if ($config{'stop_cmd'}) {
8         $out = &backquote_logged("$config{'stop_cmd'} 2>&1 </dev/null");
9         &error("<pre>$out</pre>") if ($out =~ /error|failed/ || $?);
10         }
11 else {
12         @pids = &find_byname("cfd");
13         @pids || &error($text{'stop_epids'});
14         &kill_logged('TERM', @pids) || &error(&text('stop_ekill', $!));
15         }
16 &webmin_log("stop");
17 &redirect("edit_cfd.cgi");
18