Project

General

Profile

Download (420 Bytes) Statistics
| Branch: | Revision:
1
#!/usr/bin/perl
2
# stop.cgi
3
# Stop the mon process
4

    
5
require './mon-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("<tt>$out</tt>") if ($?);
10
	}
11
else {
12
	if (open(PID, $config{'pid_file'}) && chop($pid = <PID>) &&
13
	    &kill_logged('TERM', $pid)) {
14
		close(PID);
15
		}
16
	else {
17
		&error($text{'stop_epid'});
18
		}
19
	}
20
&redirect("");
21

    
(46-46/46)