#!/usr/bin/perl -w use esmith::Build::CreateLinks qw(:all); # Templates to expand foreach my $conf (qw!zabbix_agentd.conf zabbix_agentd.conf.d/asterisk.conf zabbix_agentd.conf.d/deprecated_cpunum.conf zabbix_agentd.conf.d/deprecated_memory.conf zabbix_agentd.conf.d/deprecated_netstat.conf zabbix_agentd.conf.d/deprecated_swap.conf zabbix_agentd.conf.d/extip.conf zabbix_agentd.conf.d/mail.conf zabbix_agentd.conf.d/mysql.conf zabbix_agentd.conf.d/phpki_certs.conf zabbix_agentd.conf.d/samba.conf zabbix_agentd.conf.d/block_devices.conf!){ templates2events("/etc/zabbix/$conf", qw(zabbix-agent-update bootstrap-console-save smeserver-zabbix-agent-update)); } templates2events("/etc/sudoers", "zabbix-agent-update"); templates2events("/etc/rc.d/init.d/masq", "zabbix-agent-update"); templates2events("/etc/crontab", "zabbix-agent-update"); # Services to restart safe_symlink("restart", "root/etc/e-smith/events/zabbix-agent-update/services2adjust/zabbix-agent"); safe_symlink("adjust", "root/etc/e-smith/events/zabbix-agent-update/services2adjust/masq"); $event="smeserver-zabbix-agent-update"; templates2events("/etc/sudoers", $event); templates2events("/etc/rc.d/init.d/masq", $event); templates2events("/etc/crontab", $event); templates2events("/etc/backup-data.d/smeserver-zabbix-agent.include", $event); # Services to restart safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/zabbix-agent"); safe_symlink("adjust", "root/etc/e-smith/events/$event/services2adjust/masq"); # systemd-specific action mandatory for this package-update event event_link("systemd-reload", $event, "89"); event_link("systemd-default", $event, "88");