smeserver-cacti/createlinks

57 lines
1.2 KiB
Perl

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
for my $event (qw(
post-upgrade
bootstrap-console-save
console-save
))
{
templates2events("/etc/cacti/db.php", $event);
}
for my $event (qw(
cacti-update
))
{
templates2events("/etc/httpd/conf/httpd.conf", $event);
templates2events("/etc/cacti/db.php", $event);
safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
templates2events("/etc/crontab", $event);
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/crond");
}
templates2events("/etc/e-smith/sql/init/80cacti", "post-upgrade");
my $event="smeserver-cacti-update";
event_templates($event, qw(
/etc/cacti/db.php
/etc/httpd/conf/httpd.conf
/etc/crontab
/etc/my.cnf
/etc/opt/remi/php74/php-fpm.d/www.conf
/etc/e-smith/sql/init/80cacti
));
event_services($event,
'crond' => 'restart',
'mysql.init' => 'restart',
'mariadb' => 'restart',
'httpd-e-smith' => 'sigusr1',
'php74-php-fpm' => 'reload-or-restart'
);
event_actions($event,
'cacti-conf' => '2',
'cacti-install' => '94',
);
#backup ?
#use esmith::Build::Backup qw(:all);
#backup_includes("smeserver-cacti", qw(
#
#));