* Sat Mar 01 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-6.sme
- move to full systemd units [SME: 12878]
This commit is contained in:
6
root/etc/e-smith/templates/etc/rsyslog.conf/32dnscache
Normal file
6
root/etc/e-smith/templates/etc/rsyslog.conf/32dnscache
Normal file
@@ -0,0 +1,6 @@
|
||||
#dnscache
|
||||
:programname, isequal, "dnscache" /var/log/dnscache/dnscache.log
|
||||
& stop
|
||||
:programname, isequal, "dnscache.forwarder" /var/log/dnscache.forwarder/dnscache.forwarder.log
|
||||
& stop
|
||||
|
@@ -0,0 +1,10 @@
|
||||
[Service]
|
||||
{
|
||||
my $datalimit = $dnscache{'DataLimit'} || "12000000";
|
||||
my $c = $dnscache{'CacheSize'} || 10000000;
|
||||
my $forwarder = (defined $dnscache{'Forwarder'} && $dnscache{'Forwarder'}) ? "FORWARDONLY=1" : "";
|
||||
$OUT = "LimitDATA=$datalimit\n";
|
||||
$OUT .= 'Environment=\n";
|
||||
$OUT .= 'Environment="DATALIMIT='.$datalimit.'" "IP=127.0.0.2" IPSEND=0.0.0.0 '.$forwarder.' CACHESIZE='.$c.' GID=410 UID=410 "ROOT=/var/service/dnscache.forwarder/root"';
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
i[Service]
|
||||
{
|
||||
my $datalimit = $dnscache{'DataLimit'} || "3000000";
|
||||
my $localip = $config->get('LocalIP');
|
||||
my $ListenIP= $dnscache->prop('ListenIP') || $localip->value || "127.0.0.3";
|
||||
$OUT = "LimitDATA=$datalimit\n";
|
||||
$OUT .= 'Environment="DATALIMIT='.$datalimit.'" "IP='.$ListenIP.'" IPSEND=0.0.0.0 GID=410 UID=410 "ROOT=/var/service/dnscache/root"';
|
||||
}
|
||||
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
my $c = $dnscache{'CacheSize'} || 10000000;
|
||||
"export CACHESIZE=$c"
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
my $datalimit = $dnscache{'DataLimit'} || 12000000;
|
||||
"DATALIMIT=$datalimit";
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
(defined $dnscache{'Forwarder'} && $dnscache{'Forwarder'}) ?
|
||||
"export FORWARDONLY=1" : "";
|
||||
}
|
@@ -1 +0,0 @@
|
||||
export IP=127.0.0.2
|
@@ -1 +0,0 @@
|
||||
export IPSEND=0.0.0.0
|
@@ -1 +0,0 @@
|
||||
export ROOT=/var/service/dnscache.forwarder/root
|
16
root/etc/logrotate.d/dnscache
Normal file
16
root/etc/logrotate.d/dnscache
Normal file
@@ -0,0 +1,16 @@
|
||||
/var/log/dnscache.forwarder/dnscache.forwarder.log
|
||||
/var/log/dnscache/dnscache.log{
|
||||
weekly
|
||||
rotate 4
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
sharedscripts
|
||||
su root root
|
||||
create 600 root root
|
||||
postrotate
|
||||
/usr/bin/systemctl try-restart dnscache.service dnscache.forwarder.service >/dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
|
Reference in New Issue
Block a user