#!/usr/local/bin/perl
# start.cgi
# Start sendmail

require './sendmail-lib.pl';
$access{'stop'} || &error("You are not allowed to start sendmail");
$whatfailed = "Failed to start sendmail";
if ($config{'sendmail_stop_command'}) {
	# Make sure any init script lock files are gone
	&backquote_logged("$config{'sendmail_stop_command'} </dev/null 2>&1");
	}
$out = &backquote_logged("$config{'sendmail_command'} </dev/null 2>&1");
if ($?) { &error("<pre>$out</pre>"); }
&webmin_log("start");
&redirect("");

