MOON
Server: Apache
System: Linux cl1170g 4.19.62-mod-std-ipv6-64-rescue #828825 SMP Tue Jul 30 13:54:49 UTC 2019 x86_64
User: wh0f20bb (1057)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //proc/thread-self/root/root/webmin-1.740/fail2ban/atboot.cgi
#!/usr/bin/perl
# Enable the Fail2ban server at boot, or not

use strict;
use warnings;
require './fail2ban-lib.pl';
our (%text, %in, %config, $module_config_directory);
&ReadParse();

&foreign_require("init");
my $starting = &init::action_status($config{'init_script'});
if ($starting != 2 && $in{'boot'}) {
	# Enable at boot
	my $startscript = &has_command($config{'client_cmd'})." -x start";
	my $stopscript = &has_command($config{'client_cmd'})." stop";
	&init::enable_at_boot($config{'init_script'},
		"Start Fail2Ban server",
		$startscript,
		$stopscript,
		undef,
		{ 'fork' => 1 },
		);
	&webmin_log("atboot");
	}
elsif ($starting == 2 && !$in{'boot'}) {
	# Disable at boot
	&init::disable_at_boot($config{'init_script'});
	&webmin_log("delboot");
	}

&redirect("");