|
|
@ -4,8 +4,6 @@ my $user = ${'zabbix-proxy'}{'DbUser'} || 'zabbix'; |
|
|
|
my $pass = ${'zabbix-proxy'}{'DbPassword'} || 'secret'; |
|
|
|
my $pass = ${'zabbix-proxy'}{'DbPassword'} || 'secret'; |
|
|
|
|
|
|
|
|
|
|
|
my $schema = `rpm -qd zabbix-server | grep schema | grep mysql`; |
|
|
|
my $schema = `rpm -qd zabbix-server | grep schema | grep mysql`; |
|
|
|
my $data = `rpm -qd zabbix-server | grep data.sql`; |
|
|
|
|
|
|
|
my $images = `rpm -qd zabbix-server | grep images_mysql`; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$OUT .= <<"END"; |
|
|
|
$OUT .= <<"END"; |
|
|
@ -17,8 +15,6 @@ if [ -d /var/lib/mysql/$db ]; then |
|
|
|
else |
|
|
|
else |
|
|
|
/usr/bin/mysqladmin create $db |
|
|
|
/usr/bin/mysqladmin create $db |
|
|
|
/usr/bin/mysql $db < $schema |
|
|
|
/usr/bin/mysql $db < $schema |
|
|
|
/usr/bin/mysql $db < $data |
|
|
|
|
|
|
|
/usr/bin/mysql $db < $images |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
/usr/bin/mysql <<EOF |
|
|
|
/usr/bin/mysql <<EOF |
|
|
|