2023-07-12 09:51:05 +02:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
|
|
|
|
foreach (qw(root/servers/@ config))
|
|
|
|
{
|
|
|
|
templates2events("/var/service/dnscache.forwarder/$_",
|
2024-04-04 16:11:59 +02:00
|
|
|
qw(bootstrap-console-save console-save dns-update smeserver-dnscache-update));
|
2023-07-12 09:51:05 +02:00
|
|
|
}
|
|
|
|
templates2events('/var/service/dnscache/root/servers/@',
|
2024-04-04 16:11:59 +02:00
|
|
|
qw(bootstrap-console-save console-save dns-update smeserver-dnscache-update));
|
2023-07-12 09:51:05 +02:00
|
|
|
|
|
|
|
foreach my $event (qw(
|
|
|
|
console-save
|
|
|
|
network-create
|
|
|
|
network-delete
|
|
|
|
domain-create
|
|
|
|
domain-delete
|
|
|
|
domain-modify
|
|
|
|
dns-update
|
2024-04-04 16:11:59 +02:00
|
|
|
smeserver-dnscache-update
|
2023-07-12 09:51:05 +02:00
|
|
|
))
|
|
|
|
{
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache");
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach my $event (qw(
|
|
|
|
console-save
|
|
|
|
dns-update
|
2024-04-04 16:11:59 +02:00
|
|
|
smeserver-dnscache-update
|
2023-07-12 09:51:05 +02:00
|
|
|
))
|
|
|
|
{
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache.forwarder");
|
|
|
|
}
|
|
|
|
|
|
|
|
event_link("initialize-default-databases", "dns-update", "00");
|
|
|
|
event_link("initialize-default-databases", "domain-modify", "00");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
2024-04-04 16:11:59 +02:00
|
|
|
# other actions for smeserver-dnscache-update event
|
2023-07-12 09:51:05 +02:00
|
|
|
#--------------------------------------------------
|
2024-04-04 16:11:59 +02:00
|
|
|
$event = "smeserver-dnscache-update";
|
2023-07-12 09:51:05 +02:00
|
|
|
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event);
|
|
|
|
event_link("systemd-reload", $event, "89");
|
|
|
|
|
|
|
|
|