1 |
jpp |
1.1 |
diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/db/configuration/migrate/zabbix-server-database smeserver-zabbix-server-0.1/root/etc/e-smith/db/configuration/migrate/zabbix-server-database |
2 |
|
|
--- smeserver-zabbix-server-0.1.old/root/etc/e-smith/db/configuration/migrate/zabbix-server-database 2021-11-08 23:59:33.595000000 -0500 |
3 |
|
|
+++ smeserver-zabbix-server-0.1/root/etc/e-smith/db/configuration/migrate/zabbix-server-database 2021-11-09 00:05:12.898000000 -0500 |
4 |
|
|
@@ -29,5 +29,10 @@ |
5 |
|
|
} |
6 |
|
|
$rec->set_prop('DbPassword', $pw); |
7 |
|
|
} |
8 |
|
|
+ |
9 |
|
|
+ my $AdminPass = $rec->prop('AdminPassword') || |
10 |
|
|
+ $rec->set_prop('AdminPassword', `/usr/bin/openssl rand -base64 15 | /usr/bin/tr -c -d '[:graph:]'`); |
11 |
|
|
+ |
12 |
|
|
+ |
13 |
|
|
} |
14 |
|
|
|
15 |
|
|
diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server |
16 |
|
|
--- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server 2021-11-08 23:59:33.725000000 -0500 |
17 |
|
|
+++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server 2021-11-09 00:13:00.980000000 -0500 |
18 |
|
|
@@ -7,6 +7,7 @@ |
19 |
|
|
chomp $schema; |
20 |
|
|
my $curcharset= ( -d "/var/lib/mysql/$db" ) ? `echo 'show variables like "character_set_database";'|mysql $db|grep character_set_database|sed -r 's/^character_set_database\\s*([a-zA-Z0-9_-]+)/\\1/'` : "utf8"; |
21 |
|
|
chomp $curcharset; |
22 |
|
|
+my $adminpass= ${'zabbix-server'}{'AdminPassword'} || 'zabbix'; |
23 |
|
|
|
24 |
|
|
$OUT .= <<"END"; |
25 |
|
|
#! /bin/sh |
26 |
|
|
@@ -28,6 +29,12 @@ |
27 |
|
|
fi |
28 |
|
|
|
29 |
|
|
/usr/bin/mysql <<EOF |
30 |
|
|
+USE $db; |
31 |
|
|
+update users set passwd=md5('$adminpass') where alias='Admin' and passwd=md5('zabbix'); |
32 |
|
|
+EOF |
33 |
|
|
+ |
34 |
|
|
+ |
35 |
|
|
+/usr/bin/mysql <<EOF |
36 |
|
|
USE mysql; |
37 |
|
|
|
38 |
|
|
REPLACE INTO user ( |