#!/usr/local/bin/perl
# start.cgi
# Start the ProFTPD server process

require './proftpd-lib.pl';
&error_setup($text{'start_err'});
$conf = &get_config();
$st = &find_directive("ServerType", $conf);
if ($st eq 'inetd') {
	&error($text{'start_einetd'});
	}
if ($config{'start_cmd'}) {
	$out = &backquote_logged("$config{'start_cmd'} 2>&1 </dev/null");
	}
else {
	$out = &backquote_logged("$config{'proftpd_path'} 2>&1 </dev/null");
	}
if ($?) {
	&error($out);
	}
&webmin_log("start");
&redirect($in{'redir'});

