initial commit of file from CVS for e-smith-ntp on Wed 12 Jul 09:00:21 BST 2023

This commit is contained in:
Brian Read
2023-07-12 09:00:21 +01:00
parent 59f5643b62
commit 4d143a42fe
37 changed files with 3230 additions and 2 deletions

78
createlinks Executable file
View File

@@ -0,0 +1,78 @@
#!/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");
#--------------------------------------------------
# actions for e-smith-ntp-update event
#--------------------------------------------------
$event = "e-smith-ntp-update";
foreach my $file (qw(/etc/ntp/step-tickers /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))
{
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");