initial commit of file from CVS for smeserver-xt_geoip on Sat Sep 7 16:46:09 AEST 2024
This commit is contained in:
1
root/etc/e-smith/db/configuration/defaults/masq/GeoIP
Normal file
1
root/etc/e-smith/db/configuration/defaults/masq/GeoIP
Normal file
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
imaps,pop3s,sshd,ftp,sqpsmtpd
|
20
root/etc/e-smith/db/configuration/migrate/20xt_geoip
Normal file
20
root/etc/e-smith/db/configuration/migrate/20xt_geoip
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
my @addexclude = split(/,/,"imap,imaps,pop3,pop3s,pptpd,sshd,ftp,qpsmtpd,sqpsmtpd");
|
||||
my $masq = $DB->get('masq') or return;
|
||||
|
||||
my @exclude = split(/,/, $masq->prop('XtServices') || '');
|
||||
push @exclude, @addexclude;
|
||||
# remove duplicates
|
||||
undef %saw;
|
||||
@exclude = grep(!$saw{$_}++, @exclude);
|
||||
if ($#exclude > 0)
|
||||
{
|
||||
$masq->set_prop('XtServices', join(',', @exclude));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$masq->delete_prop('XtServices');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user