|
|
|
#!/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));
|
|
|
|
}
|
|
|
|
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");
|
|
|
|
|
|
|
|
# Start and stop links
|
|
|
|
service_link_enhanced("zabbix-agent", "S98", "7");
|
|
|
|
service_link_enhanced("zabbix-agent", "K10", "6");
|
|
|
|
service_link_enhanced("zabbix-agent", "K10", "0");
|
|
|
|
|