2023-10-26 12:21:08 +02:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# functions for manager panel
|
|
|
|
#--------------------------------------------------
|
|
|
|
my $panel = "manager";
|
|
|
|
|
|
|
|
panel_link("domains", $panel);
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for domain-create event
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
|
|
|
$event = "domain-create";
|
|
|
|
|
|
|
|
safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/tinydns");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache.forwarder");
|
|
|
|
templates2events("/var/service/dnscache/root/servers/@", $event);
|
|
|
|
templates2events("/var/service/dnscache.forwarder/root/servers/@", $event);
|
|
|
|
templates2events("/var/service/dnscache.forwarder/config", $event);
|
|
|
|
templates2events("/home/e-smith/ssl.pem/pem", $event);
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for domain-delete event
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
|
|
|
$event = "domain-delete";
|
|
|
|
|
|
|
|
safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/tinydns");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache.forwarder");
|
|
|
|
templates2events("/var/service/dnscache/root/servers/@", $event);
|
|
|
|
templates2events("/var/service/dnscache.forwarder/root/servers/@", $event);
|
|
|
|
templates2events("/var/service/dnscache.forwarder/config", $event);
|
|
|
|
templates2events("/home/e-smith/ssl.pem/pem", $event);
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for domain-modify event
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
|
|
|
$event = "domain-modify";
|
|
|
|
|
|
|
|
templates2events("/home/e-smith/ssl.pem/pem", $event);
|
|
|
|
safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/tinydns");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache.forwarder");
|
|
|
|
templates2events("/var/service/dnscache/root/servers/@", $event);
|
|
|
|
templates2events("/var/service/dnscache.forwarder/root/servers/@", $event);
|
|
|
|
templates2events("/var/service/dnscache.forwarder/config", $event);
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
2024-04-04 16:12:01 +02:00
|
|
|
# actions for smeserver-domains-update event
|
2023-10-26 12:21:08 +02:00
|
|
|
#--------------------------------------------------
|
|
|
|
|
2024-04-04 16:12:01 +02:00
|
|
|
$event = "smeserver-domains-update";
|
2023-10-26 12:21:08 +02:00
|
|
|
|
|
|
|
templates2events("/home/e-smith/ssl.pem/pem", $event);
|
|
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/tinydns");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/dnscache.forwarder");
|
|
|
|
templates2events("/var/service/dnscache/root/servers/@", $event);
|
|
|
|
templates2events("/var/service/dnscache.forwarder/root/servers/@", $event);
|
|
|
|
templates2events("/var/service/dnscache.forwarder/config", $event);
|
|
|
|
|