diff -urN e-smith-tinydns-2.6.0.old/createlinks e-smith-tinydns-2.6.0/createlinks --- e-smith-tinydns-2.6.0.old/createlinks 2006-03-15 02:01:42.000000000 +0400 +++ e-smith-tinydns-2.6.0/createlinks 2020-11-15 21:03:51.669079903 +0400 @@ -4,23 +4,27 @@ use strict; use esmith::Build::CreateLinks qw(:all); -#-------------------------------------------------- -# actions for bootstrap-console-save event: -#-------------------------------------------------- -my $event = "bootstrap-console-save"; - +#------------------------------------------------------------------- +# actions for bootstrap-console-save event, e-smith-tinydns-update : +#------------------------------------------------------------------- foreach (qw( env/IP env/DATALIMIT root/data )) { - templates2events("/var/service/tinydns/$_", $event); + templates2events("/var/service/tinydns/$_", qw( + bootstrap-console-save + e-smith-tinydns-update + )); } -$event = "ip-change"; +my $event = "ip-change"; safe_symlink("sigusr2", "root/etc/e-smith/events/$event/services2adjust/tinydns"); +$event = "e-smith-tinydns-update"; +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/tinydns"); + safe_symlink("daemontools", "root/etc/rc.d/init.d/tinydns"); service_link_enhanced("tinydns", "S55", "7"); service_link_enhanced("tinydns", "K65", "6"); diff -urN e-smith-tinydns-2.6.0.old/root/usr/lib/systemd/system/tinydns.service e-smith-tinydns-2.6.0/root/usr/lib/systemd/system/tinydns.service --- e-smith-tinydns-2.6.0.old/root/usr/lib/systemd/system/tinydns.service 1970-01-01 04:00:00.000000000 +0400 +++ e-smith-tinydns-2.6.0/root/usr/lib/systemd/system/tinydns.service 2020-11-15 20:34:41.237876728 +0400 @@ -0,0 +1,14 @@ +[Unit] +Description=tinydns, +After=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 + +[Install] +WantedBy=sme-server.target