* Tue Feb 25 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme
- move to full systemd unit [SME: 12877]
This commit is contained in:
3
root/etc/e-smith/templates/etc/rsyslog.conf/32tinydns
Normal file
3
root/etc/e-smith/templates/etc/rsyslog.conf/32tinydns
Normal file
@@ -0,0 +1,3 @@
|
||||
#tinydns
|
||||
:programname, isequal, "tinydns" /var/log/tinydns/tinydns.log
|
||||
& stop
|
@@ -0,0 +1,7 @@
|
||||
[Service]
|
||||
{
|
||||
my $datalimit = $tinydns{'DataLimit'} || "3000000";
|
||||
my $ListenIP= $tinydns{'ListenIP'} || "127.0.0.1";
|
||||
$OUT = "LimitDATA=$datalimit\n";
|
||||
$OUT .= 'Environment="DATALIMIT='.$datalimit.'" "IP='.$ListenIP.'" GID=53 UID=53 "ROOT=/var/service/tinydns/root"';
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
{
|
||||
my $datalimit = $tinydns{'DataLimit'} || "300000";
|
||||
"$datalimit";
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
{
|
||||
$OUT = $tinydns{'ListenIP'} || "127.0.0.1";
|
||||
}
|
15
root/etc/logrotate.d/tinydns
Normal file
15
root/etc/logrotate.d/tinydns
Normal file
@@ -0,0 +1,15 @@
|
||||
/var/log/tinydns/tinydns.log{
|
||||
weekly
|
||||
rotate 4
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
sharedscripts
|
||||
su root root
|
||||
create 600 root root
|
||||
postrotate
|
||||
/usr/bin/systemctl try-restart tinydns.service >/dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
|
@@ -1 +0,0 @@
|
||||
/var/service/tinydns
|
@@ -1,15 +1,27 @@
|
||||
[Unit]
|
||||
Description=tinydns,
|
||||
Description=tinydns, A DNS server daemon
|
||||
Documentation=man:tinydns(8)
|
||||
After=network.target
|
||||
Requires=runit.service
|
||||
After=networking.service
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/sbin/e-smith/service-status tinydns
|
||||
ExecStart=/usr/bin/sv u /service/tinydns
|
||||
ExecStop=/usr/bin/sv stop /service/tinydns
|
||||
ExecReload=/usr/bin/sv t /service/tinydns
|
||||
RemainAfterExit=yes
|
||||
Type=simple
|
||||
PermissionsStartOnly=true
|
||||
LimitDATA=3000000
|
||||
WorkingDirectory=/var/service/tinydns/root
|
||||
Environment="DATALIMIT=3000000" "IP=127.0.0.1" GID=53 UID=53 "ROOT=/var/service/tinydns/root"
|
||||
ExecStartPre=/sbin/e-smith/systemd/tinydns-control1
|
||||
ExecStartPre=/sbin/e-smith/systemd/tinydns-control2
|
||||
ExecStart=/usr/local/bin/tinydns
|
||||
ExecReload=/sbin/e-smith/systemd/tinydns-control1
|
||||
ExecReload=/sbin/e-smith/systemd/tinydns-control2
|
||||
#ExecReload=/bin/kill -CONT $MAINPID
|
||||
|
||||
Restart=always
|
||||
RestartSec=20s
|
||||
SyslogIdentifier=tinydns
|
||||
|
||||
[Install]
|
||||
WantedBy=sme-server.target
|
||||
|
0
root/usr/lib/systemd/system/tinydns.service.d/.gitignore
vendored
Normal file
0
root/usr/lib/systemd/system/tinydns.service.d/.gitignore
vendored
Normal file
Reference in New Issue
Block a user