Add option for execute only DB scripts on proxy and server

This commit is contained in:
Alexey Pustovalov 2022-12-29 23:56:38 +09:00
parent 2a523ab4ff
commit 8d1615a33a
14 changed files with 178 additions and 52 deletions

View File

@ -466,15 +466,20 @@ update_zbx_config() {
fi
}
prepare_proxy() {
echo "Preparing Zabbix proxy"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_proxy() {
echo "** Preparing Zabbix proxy"
prepare_db
update_zbx_config
}
@ -488,6 +493,10 @@ if [ "$1" == '/usr/sbin/zabbix_proxy' ]; then
prepare_proxy
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -463,15 +463,20 @@ update_zbx_config() {
fi
}
prepare_proxy() {
echo "Preparing Zabbix proxy"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_proxy() {
echo "** Preparing Zabbix proxy"
prepare_db
update_zbx_config
}
@ -485,6 +490,10 @@ if [ "$1" == '/usr/sbin/zabbix_proxy' ]; then
prepare_proxy
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -463,15 +463,20 @@ update_zbx_config() {
fi
}
prepare_proxy() {
echo "Preparing Zabbix proxy"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_proxy() {
echo "** Preparing Zabbix proxy"
prepare_db
update_zbx_config
}
@ -485,6 +490,10 @@ if [ "$1" == '/usr/sbin/zabbix_proxy' ]; then
prepare_proxy
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -463,15 +463,20 @@ update_zbx_config() {
fi
}
prepare_proxy() {
echo "Preparing Zabbix proxy"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_proxy() {
echo "** Preparing Zabbix proxy"
prepare_db
update_zbx_config
}
@ -485,6 +490,10 @@ if [ "$1" == '/usr/sbin/zabbix_proxy' ]; then
prepare_proxy
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -463,15 +463,20 @@ update_zbx_config() {
fi
}
prepare_proxy() {
echo "Preparing Zabbix proxy"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_proxy() {
echo "** Preparing Zabbix proxy"
prepare_db
update_zbx_config
}
@ -485,6 +490,10 @@ if [ "$1" == '/usr/sbin/zabbix_proxy' ]; then
prepare_proxy
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -479,15 +479,20 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -501,6 +506,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -476,15 +476,20 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -498,6 +503,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -476,15 +476,20 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -498,6 +503,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -476,15 +476,20 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -498,6 +503,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -476,15 +476,20 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_mysql
check_db_connect_mysql
create_db_user_mysql
create_db_database_mysql
create_db_schema_mysql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -498,6 +503,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -514,14 +514,19 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_postgresql
check_db_connect_postgresql
create_db_database_postgresql
create_db_schema_postgresql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -535,6 +540,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -514,14 +514,19 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_postgresql
check_db_connect_postgresql
create_db_database_postgresql
create_db_schema_postgresql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -535,6 +540,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -514,14 +514,19 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_postgresql
check_db_connect_postgresql
create_db_database_postgresql
create_db_schema_postgresql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -535,6 +540,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################

View File

@ -514,14 +514,19 @@ update_zbx_config() {
fi
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db() {
echo "** Preparing database"
check_variables_postgresql
check_db_connect_postgresql
create_db_database_postgresql
create_db_schema_postgresql
}
prepare_server() {
echo "** Preparing Zabbix server"
prepare_db
update_zbx_config
}
@ -535,6 +540,10 @@ if [ "$1" == '/usr/sbin/zabbix_server' ]; then
prepare_server
fi
if [ "$1" == "init_db_only" ]; then
prepare_db
else
exec "$@"
fi
#################################################