-
Notifications
You must be signed in to change notification settings - Fork 2
/
createlinks
51 lines (38 loc) · 1.66 KB
/
createlinks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/perl
use strict;
use esmith::Build::CreateLinks qw(:all);
#--------------------------------------------------
## example of what is a createlinks
##--------------------------------------------------
#mandatory to create db after installation
my $event = 'nethserver-zabbix-update';
event_actions ($event,
'initialize-default-databases' => '00',
'nethserver-zabbix-conf' => '10',
'nethserver-zabbix-conf-db' => '90'
);
templates2events("/etc/httpd/conf.d/zabbix.conf", $event);
templates2events("/etc/httpd/conf.d/default-virtualhost.inc", $event);
templates2events("/etc/zabbix/zabbix_server.conf", $event);
templates2events("/etc/zabbix_server.conf", $event);
templates2events("/etc/zabbix/web/zabbix.conf.php", $event);
templates2events("/var/opt/rh/rh-postgresql13/lib/pgsql/data/pg_hba.conf", $event);
templates2events("/etc/opt/rh/rh-php73/php-fpm.d/zabbix.conf", $event);
#templates2events("/etc/nethserver/eorepo.conf", $event);
event_services($event,
'zabbix-server' => 'restart',
'httpd' => 'reload',
'rh-postgresql13-postgresql' => 'restart',
'rh-php73-php-fpm' => 'restart'
);
#--------------------------------------------------
# actions for pre-backup-data event
#--------------------------------------------------
$event = 'pre-backup-data';
event_actions($event, 'nethserver-zabbix-backup' => 50);
#--------------------------------------------------
# actions for post-restore-data event
#--------------------------------------------------
$event = 'post-restore-data';
event_actions($event, 'nethserver-zabbix-restore' => 50);
event_services($event, 'zabbix-server' => 'restart');