smeserver-ntp/createlinks

79 lines
2.7 KiB
Plaintext
Raw Permalink Normal View History

#!/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 smeserver-ntp-update event
#--------------------------------------------------
$event = "smeserver-ntp-update";
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))
{
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");