2023-07-12 10:00:21 +02:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for manager panel
|
|
|
|
#--------------------------------------------------
|
|
|
|
my $panel = "manager";
|
|
|
|
|
|
|
|
panel_link("datetime", $panel);
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for ip-change event
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
|
|
|
$event = "ip-change";
|
|
|
|
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd");
|
|
|
|
|
|
|
|
# Configuration template expansion of ntp.conf
|
|
|
|
foreach my $file (
|
|
|
|
qw(/etc/ntp/step-tickers /etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf))
|
|
|
|
{
|
|
|
|
templates2events($file, qw(
|
|
|
|
timeserver-update
|
|
|
|
bootstrap-console-save
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for timeserver-update event
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
|
|
|
$event = "timeserver-update";
|
|
|
|
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for timezone-update event
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
|
|
|
$event = "timezone-update";
|
|
|
|
|
|
|
|
event_link("conf-timezone", $event, "30");
|
|
|
|
event_link("set-time-date", $event, "40");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/crond");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for bootstrap-console-save event
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
|
|
|
$event = "bootstrap-console-save";
|
|
|
|
|
|
|
|
event_link("conf-timezone", $event, "04");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
2024-04-04 16:12:16 +02:00
|
|
|
# actions for smeserver-ntp-update event
|
2023-07-12 10:00:21 +02:00
|
|
|
#--------------------------------------------------
|
|
|
|
|
2024-04-04 16:12:16 +02:00
|
|
|
$event = "smeserver-ntp-update";
|
2023-07-12 10:00:21 +02:00
|
|
|
|
2024-04-17 20:55:55 +02:00
|
|
|
foreach my $file (qw(/etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf /etc/systemd/system-preset/49-koozali.preset /etc/rsyslog.conf /etc/logrotate.d/ntpd))
|
2023-07-12 10:00:21 +02:00
|
|
|
{
|
|
|
|
templates2events( $file, $event );
|
|
|
|
}
|
|
|
|
|
|
|
|
event_link("systemd-default", $event, "10");
|
|
|
|
event_link("conf-timezone", $event, "30");
|
|
|
|
event_link("systemd-reload", $event, "50");
|
|
|
|
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|