47 lines
1.2 KiB
Perl
Executable File
47 lines
1.2 KiB
Perl
Executable File
#!/usr/bin/perl -w
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
foreach (qw(root/servers/@ config))
|
|
{
|
|
templates2events("/var/service/dnscache.forwarder/$_",
|
|
qw(bootstrap-console-save console-save dns-update e-smith-dnscache-update));
|
|
}
|
|
templates2events('/var/service/dnscache/root/servers/@',
|
|
qw(bootstrap-console-save console-save dns-update e-smith-dnscache-update));
|
|
|
|
foreach my $event (qw(
|
|
console-save
|
|
network-create
|
|
network-delete
|
|
domain-create
|
|
domain-delete
|
|
domain-modify
|
|
dns-update
|
|
e-smith-dnscache-update
|
|
))
|
|
{
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache");
|
|
}
|
|
|
|
foreach my $event (qw(
|
|
console-save
|
|
dns-update
|
|
e-smith-dnscache-update
|
|
))
|
|
{
|
|
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");
|
|
|
|
#--------------------------------------------------
|
|
# other actions for e-smith-dnscache-update event
|
|
#--------------------------------------------------
|
|
$event = "e-smith-dnscache-update";
|
|
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event);
|
|
event_link("systemd-reload", $event, "89");
|
|
|
|
|