#!/usr/local/bin/perl
# stop.cgi

require './usermin-lib.pl';
$access{'stop'} || &error($text{'stop_ecannot'});
&error_setup($text{'stop_err'});
&get_usermin_miniserv_config(\%miniserv);
if (open(PID, $miniserv{'pidfile'}) && ($pid = int(<PID>))) {
	&kill_logged('TERM', $pid) || &error(&text('stop_ekill', $!));
	close(PID);
	}
else {
	&error($text{'stop_efile'});
	}
&redirect("");

