From e7e6b7c8378df5802e7026973e08d6fde3dd099b Mon Sep 17 00:00:00 2001 From: Aidaho Date: Sun, 12 Mar 2023 14:18:03 +0300 Subject: [PATCH] v6.3.7.0 Changelog: https://roxy-wi.org/changelog#6_3_7 --- app/create_db.py | 155 +++++++++++++++--------------------------- app/modules/db/sql.py | 118 +++++++++++--------------------- 2 files changed, 93 insertions(+), 180 deletions(-) diff --git a/app/create_db.py b/app/create_db.py index c461c79d..267bb1f1 100644 --- a/app/create_db.py +++ b/app/create_db.py @@ -12,102 +12,63 @@ def default_values(): data_source = [ {'param': 'time_zone', 'value': 'UTC', 'section': 'main', 'desc': 'Time Zone', 'group': '1'}, {'param': 'proxy', 'value': '', 'section': 'main', 'desc': 'IP address and port of the proxy server. Use proto://ip:port', 'group': '1'}, - {'param': 'session_ttl', 'value': '5', 'section': 'main', 'desc': 'TTL for a user session (in days)', - 'group': '1'}, - {'param': 'token_ttl', 'value': '5', 'section': 'main', 'desc': 'TTL for a user token (in days)', - 'group': '1'}, + {'param': 'session_ttl', 'value': '5', 'section': 'main', 'desc': 'TTL for a user session (in days)', 'group': '1'}, + {'param': 'token_ttl', 'value': '5', 'section': 'main', 'desc': 'TTL for a user token (in days)', 'group': '1'}, {'param': 'tmp_config_path', 'value': '/tmp/', 'section': 'main', 'desc': 'Path to the temporary directory. A valid path should be specified as the value of this parameter. ' - 'The directory must be owned by the user specified in SSH settings', - 'group': '1'}, + 'The directory must be owned by the user specified in SSH settings', 'group': '1'}, {'param': 'cert_path', 'value': '/etc/ssl/certs/', 'section': 'main', - 'desc': 'Path to SSL dir. Folder owner must be a user which set in the SSH settings. Path must exist', - 'group': '1'}, + 'desc': 'Path to SSL dir. Folder owner must be a user which set in the SSH settings. Path must exist', 'group': '1'}, {'param': 'ssl_local_path', 'value': 'certs', 'section': 'main', 'desc': 'Path to the directory with the saved local SSL certificates. The value of this parameter is ' - 'specified as a relative path beginning with $HOME_ROXY_WI/app/', - 'group': '1'}, + 'specified as a relative path beginning with $HOME_ROXY_WI/app/', 'group': '1'}, {'param': 'lists_path', 'value': 'lists', 'section': 'main', 'desc': 'Path to the black and the wild list. The value of this parameter should be specified as a relative path beginning with $HOME_ROXY-WI', 'group': '1'}, - {'param': 'haproxy_path_logs', 'value': '/var/log/haproxy/', 'section': 'haproxy', - 'desc': 'The path for HAProxy logs', 'group': '1'}, - {'param': 'syslog_server_enable', 'value': '0', 'section': 'logs', - 'desc': 'Enable getting logs from a syslog server', 'group': '1'}, - {'param': 'syslog_server', 'value': '', 'section': 'logs', 'desc': 'IP address of the syslog_server', - 'group': '1'}, - {'param': 'log_time_storage', 'value': '14', 'section': 'logs', - 'desc': 'Retention period for user activity logs (in days)', 'group': '1'}, - {'param': 'stats_user', 'value': 'admin', 'section': 'haproxy', 'desc': 'Username for accessing HAProxy stats page', - 'group': '1'}, - {'param': 'stats_password', 'value': 'password', 'section': 'haproxy', - 'desc': 'Password for accessing HAProxy stats page', 'group': '1'}, - {'param': 'stats_port', 'value': '8085', 'section': 'haproxy', 'desc': 'Port for HAProxy stats page', - 'group': '1'}, - {'param': 'stats_page', 'value': 'stats', 'section': 'haproxy', 'desc': 'URI for HAProxy stats page', - 'group': '1'}, - {'param': 'haproxy_dir', 'value': '/etc/haproxy', 'section': 'haproxy', 'desc': 'Path to the HAProxy directory', - 'group': '1'}, - {'param': 'haproxy_config_path', 'value': '/etc/haproxy/haproxy.cfg', 'section': 'haproxy', 'desc': 'Path to the HAProxy configuration file', - 'group': '1'}, - {'param': 'server_state_file', 'value': '/etc/haproxy/haproxy.state', 'section': 'haproxy', 'desc': 'Path to the HAProxy state file', - 'group': '1'}, - {'param': 'maxmind_key', 'value': '', 'section': 'haproxy', 'desc': 'License key for downloading GeoIP DB. You can create it on maxmind.com', - 'group': '1'}, - {'param': 'haproxy_sock', 'value': '/var/run/haproxy.sock', 'section': 'haproxy', - 'desc': 'Socket port for HAProxy', 'group': '1'}, - {'param': 'haproxy_sock_port', 'value': '1999', 'section': 'haproxy', 'desc': 'HAProxy sock port', - 'group': '1'}, - {'param': 'apache_log_path', 'value': f'/var/log/{apache_dir}/', 'section': 'logs', - 'desc': 'Path to Apache logs. Apache service for Roxy-WI', 'group': '1'}, - {'param': 'nginx_path_logs', 'value': '/var/log/nginx/', 'section': 'nginx', - 'desc': 'The path for NGINX logs', 'group': '1'}, - {'param': 'nginx_stats_user', 'value': 'admin', 'section': 'nginx', 'desc': 'Username for accessing NGINX stats page', - 'group': '1'}, - {'param': 'nginx_stats_password', 'value': 'password', 'section': 'nginx', - 'desc': 'Password for Stats web page NGINX', 'group': '1'}, - {'param': 'nginx_stats_port', 'value': '8086', 'section': 'nginx', 'desc': 'Stats port for web page NGINX', - 'group': '1'}, - {'param': 'nginx_stats_page', 'value': 'stats', 'section': 'nginx', 'desc': 'URI Stats for web page NGINX', - 'group': '1'}, - {'param': 'nginx_dir', 'value': '/etc/nginx/', 'section': 'nginx', - 'desc': 'Path to the NGINX directory with config files', 'group': '1'}, - {'param': 'nginx_config_path', 'value': '/etc/nginx/nginx.conf', 'section': 'nginx', - 'desc': 'Path to the main NGINX configuration file', 'group': '1'}, + {'param': 'maxmind_key', 'value': '', 'section': 'main', 'desc': 'License key for downloading GeoIP DB. You can create it on maxmind.com', 'group': '1'}, + {'param': 'haproxy_path_logs', 'value': '/var/log/haproxy/', 'section': 'haproxy', 'desc': 'The path for HAProxy logs', 'group': '1'}, + {'param': 'syslog_server_enable', 'value': '0', 'section': 'logs', 'desc': 'Enable getting logs from a syslog server', 'group': '1'}, + {'param': 'syslog_server', 'value': '', 'section': 'logs', 'desc': 'IP address of the syslog_server', 'group': '1'}, + {'param': 'log_time_storage', 'value': '14', 'section': 'logs', 'desc': 'Retention period for user activity logs (in days)', 'group': '1'}, + {'param': 'stats_user', 'value': 'admin', 'section': 'haproxy', 'desc': 'Username for accessing HAProxy stats page', 'group': '1'}, + {'param': 'stats_password', 'value': 'password', 'section': 'haproxy', 'desc': 'Password for accessing HAProxy stats page', 'group': '1'}, + {'param': 'stats_port', 'value': '8085', 'section': 'haproxy', 'desc': 'Port for HAProxy stats page', 'group': '1'}, + {'param': 'stats_page', 'value': 'stats', 'section': 'haproxy', 'desc': 'URI for HAProxy stats page', 'group': '1'}, + {'param': 'haproxy_dir', 'value': '/etc/haproxy', 'section': 'haproxy', 'desc': 'Path to the HAProxy directory', 'group': '1'}, + {'param': 'haproxy_config_path', 'value': '/etc/haproxy/haproxy.cfg', 'section': 'haproxy', 'desc': 'Path to the HAProxy configuration file', 'group': '1'}, + {'param': 'server_state_file', 'value': '/etc/haproxy/haproxy.state', 'section': 'haproxy', 'desc': 'Path to the HAProxy state file', 'group': '1'}, + {'param': 'haproxy_sock', 'value': '/var/run/haproxy.sock', 'section': 'haproxy', 'desc': 'Socket port for HAProxy', 'group': '1'}, + {'param': 'haproxy_sock_port', 'value': '1999', 'section': 'haproxy', 'desc': 'HAProxy sock port', 'group': '1'}, + {'param': 'haproxy_container_name', 'value': 'haproxy', 'section': 'haproxy', 'desc': 'Docker container name for HAProxy service', 'group': '1'}, + {'param': 'apache_log_path', 'value': f'/var/log/{apache_dir}/', 'section': 'logs', 'desc': 'Path to Apache logs. Apache service for Roxy-WI', 'group': '1'}, + {'param': 'nginx_path_logs', 'value': '/var/log/nginx/', 'section': 'nginx', 'desc': 'The path for NGINX logs', 'group': '1'}, + {'param': 'nginx_stats_user', 'value': 'admin', 'section': 'nginx', 'desc': 'Username for accessing NGINX stats page', 'group': '1'}, + {'param': 'nginx_stats_password', 'value': 'password', 'section': 'nginx', 'desc': 'Password for Stats web page NGINX', 'group': '1'}, + {'param': 'nginx_stats_port', 'value': '8086', 'section': 'nginx', 'desc': 'Stats port for web page NGINX', 'group': '1'}, + {'param': 'nginx_stats_page', 'value': 'stats', 'section': 'nginx', 'desc': 'URI Stats for web page NGINX', 'group': '1'}, + {'param': 'nginx_dir', 'value': '/etc/nginx/', 'section': 'nginx', 'desc': 'Path to the NGINX directory with config files', 'group': '1'}, + {'param': 'nginx_config_path', 'value': '/etc/nginx/nginx.conf', 'section': 'nginx', 'desc': 'Path to the main NGINX configuration file', 'group': '1'}, + {'param': 'nginx_container_name', 'value': 'nginx', 'section': 'nginx', 'desc': 'Docker container name for NGINX service', 'group': '1'}, {'param': 'ldap_enable', 'value': '0', 'section': 'ldap', 'desc': 'Enable LDAP', 'group': '1'}, {'param': 'ldap_server', 'value': '', 'section': 'ldap', 'desc': 'IP address of the LDAP server', 'group': '1'}, - {'param': 'ldap_port', 'value': '389', 'section': 'ldap', 'desc': 'LDAP port (port 389 or 636 is used by default)', - 'group': '1'}, - {'param': 'ldap_user', 'value': '', 'section': 'ldap', - 'desc': 'LDAP username. Format: user@domain.com', 'group': '1'}, + {'param': 'ldap_port', 'value': '389', 'section': 'ldap', 'desc': 'LDAP port (port 389 or 636 is used by default)', 'group': '1'}, + {'param': 'ldap_user', 'value': '', 'section': 'ldap', 'desc': 'LDAP username. Format: user@domain.com', 'group': '1'}, {'param': 'ldap_password', 'value': '', 'section': 'ldap', 'desc': 'LDAP password', 'group': '1'}, - {'param': 'ldap_base', 'value': '', 'section': 'ldap', 'desc': 'Base domain. Example: dc=domain, dc=com', - 'group': '1'}, + {'param': 'ldap_base', 'value': '', 'section': 'ldap', 'desc': 'Base domain. Example: dc=domain, dc=com', 'group': '1'}, {'param': 'ldap_domain', 'value': '', 'section': 'ldap', 'desc': 'LDAP domain for logging in', 'group': '1'}, - {'param': 'ldap_class_search', 'value': 'user', 'section': 'ldap', 'desc': 'Class for searching the user', - 'group': '1'}, - {'param': 'ldap_user_attribute', 'value': 'userPrincipalName', 'section': 'ldap', - 'desc': 'Attribute to search users by', 'group': '1'}, + {'param': 'ldap_class_search', 'value': 'user', 'section': 'ldap', 'desc': 'Class for searching the user', 'group': '1'}, + {'param': 'ldap_user_attribute', 'value': 'userPrincipalName', 'section': 'ldap', 'desc': 'Attribute to search users by', 'group': '1'}, {'param': 'ldap_search_field', 'value': 'mail', 'section': 'ldap', 'desc': 'User\'s email address', 'group': '1'}, {'param': 'ldap_type', 'value': '0', 'section': 'ldap', 'desc': 'Use LDAPS', 'group': '1'}, - {'param': 'smon_check_interval', 'value': '1', 'section': 'monitoring', 'desc': 'Check interval for SMON (in minutes)', - 'group': '1'}, - {'param': 'port_scan_interval', 'value': '5', 'section': 'monitoring', - 'desc': 'Check interval for Port scanner (in minutes)', 'group': '1'}, - {'param': 'portscanner_keep_history_range', 'value': '14', 'section': 'monitoring', - 'desc': 'Retention period for Port scanner history', 'group': '1'}, - {'param': 'smon_keep_history_range', 'value': '14', 'section': 'monitoring', - 'desc': 'Retention period for SMON history', 'group': '1'}, - {'param': 'checker_keep_history_range', 'value': '14', 'section': 'monitoring', - 'desc': 'Retention period for Checker history', 'group': '1'}, - {'param': 'checker_maxconn_threshold', 'value': '90', 'section': 'monitoring', - 'desc': 'Threshold value for alerting, in %', 'group': '1'}, - {'param': 'checker_check_interval', 'value': '1', 'section': 'monitoring', - 'desc': 'Check interval for Checker (in minutes)', 'group': '1'}, - {'param': 'smon_ssl_expire_warning_alert', 'value': '14', 'section': 'monitoring', - 'desc': 'Warning alert about a SSL certificate expiration (in days)', 'group': '1'}, - {'param': 'smon_ssl_expire_critical_alert', 'value': '7', 'section': 'monitoring', - 'desc': 'Critical alert about a SSL certificate expiration (in days)', 'group': '1'}, + {'param': 'smon_check_interval', 'value': '1', 'section': 'monitoring', 'desc': 'Check interval for SMON (in minutes)', 'group': '1'}, + {'param': 'port_scan_interval', 'value': '5', 'section': 'monitoring', 'desc': 'Check interval for Port scanner (in minutes)', 'group': '1'}, + {'param': 'portscanner_keep_history_range', 'value': '14', 'section': 'monitoring', 'desc': 'Retention period for Port scanner history', 'group': '1'}, + {'param': 'smon_keep_history_range', 'value': '14', 'section': 'monitoring', 'desc': 'Retention period for SMON history', 'group': '1'}, + {'param': 'checker_keep_history_range', 'value': '14', 'section': 'monitoring', 'desc': 'Retention period for Checker history', 'group': '1'}, + {'param': 'checker_maxconn_threshold', 'value': '90', 'section': 'monitoring', 'desc': 'Threshold value for alerting, in %', 'group': '1'}, + {'param': 'checker_check_interval', 'value': '1', 'section': 'monitoring', 'desc': 'Check interval for Checker (in minutes)', 'group': '1'}, + {'param': 'smon_ssl_expire_warning_alert', 'value': '14', 'section': 'monitoring', 'desc': 'Warning alert about a SSL certificate expiration (in days)', 'group': '1'}, + {'param': 'smon_ssl_expire_critical_alert', 'value': '7', 'section': 'monitoring', 'desc': 'Critical alert about a SSL certificate expiration (in days)', 'group': '1'}, {'param': 'rabbitmq_host', 'value': '127.0.0.1', 'section': 'rabbitmq', 'desc': 'RabbitMQ-server host', 'group': '1'}, {'param': 'rabbitmq_port', 'value': '5672', 'section': 'rabbitmq', 'desc': 'RabbitMQ-server port', 'group': '1'}, {'param': 'rabbitmq_port', 'value': '5672', 'section': 'rabbitmq', 'desc': 'RabbitMQ-server port', 'group': '1'}, @@ -115,26 +76,16 @@ def default_values(): {'param': 'rabbitmq_queue', 'value': 'roxy-wi', 'section': 'rabbitmq', 'desc': 'RabbitMQ-server queue', 'group': '1'}, {'param': 'rabbitmq_user', 'value': 'roxy-wi', 'section': 'rabbitmq', 'desc': 'RabbitMQ-server user', 'group': '1'}, {'param': 'rabbitmq_password', 'value': 'roxy-wi123', 'section': 'rabbitmq', 'desc': 'RabbitMQ-server user password', 'group': '1'}, - {'param': 'apache_path_logs', 'value': '/var/log/httpd/', 'section': 'apache', - 'desc': 'The path for Apache logs', 'group': '1'}, - {'param': 'apache_stats_user', 'value': 'admin', 'section': 'apache', - 'desc': 'Username for accessing Apache stats page', 'group': '1'}, - {'param': 'apache_stats_password', 'value': 'password', 'section': 'apache', - 'desc': 'Password for Apache stats webpage', 'group': '1'}, - {'param': 'apache_stats_port', 'value': '8087', 'section': 'apache', 'desc': 'Stats port for webpage Apache', - 'group': '1'}, - {'param': 'apache_stats_page', 'value': 'stats', 'section': 'apache', 'desc': 'URI Stats for webpage Apache', - 'group': '1'}, - {'param': 'apache_dir', 'value': '/etc/httpd/', 'section': 'apache', - 'desc': 'Path to the Apache directory with config files', 'group': '1'}, - {'param': 'apache_config_path', 'value': '/etc/httpd/conf/httpd.conf', 'section': 'apache', - 'desc': 'Path to the main Apache configuration file', 'group': '1'}, - {'param': 'apache_container_name', 'value': 'apache', 'section': 'apache', - 'desc': 'Docker container name for Apache service', 'group': '1'}, - {'param': 'keepalived_config_path', 'value': '/etc/keepalived/keepalived.conf', 'section': 'keepalived', - 'desc': 'Path to the main Keepalived configuration file', 'group': '1'}, - {'param': 'keepalived_path_logs', 'value': '/var/log/keepalived/', 'section': 'keepalived', - 'desc': 'The path for Keepalived logs', 'group': '1'}, + {'param': 'apache_path_logs', 'value': '/var/log/httpd/', 'section': 'apache', 'desc': 'The path for Apache logs', 'group': '1'}, + {'param': 'apache_stats_user', 'value': 'admin', 'section': 'apache', 'desc': 'Username for accessing Apache stats page', 'group': '1'}, + {'param': 'apache_stats_password', 'value': 'password', 'section': 'apache', 'desc': 'Password for Apache stats webpage', 'group': '1'}, + {'param': 'apache_stats_port', 'value': '8087', 'section': 'apache', 'desc': 'Stats port for webpage Apache', 'group': '1'}, + {'param': 'apache_stats_page', 'value': 'stats', 'section': 'apache', 'desc': 'URI Stats for webpage Apache', 'group': '1'}, + {'param': 'apache_dir', 'value': '/etc/httpd/', 'section': 'apache', 'desc': 'Path to the Apache directory with config files', 'group': '1'}, + {'param': 'apache_config_path', 'value': '/etc/httpd/conf/httpd.conf', 'section': 'apache', 'desc': 'Path to the main Apache configuration file', 'group': '1'}, + {'param': 'apache_container_name', 'value': 'apache', 'section': 'apache', 'desc': 'Docker container name for Apache service', 'group': '1'}, + {'param': 'keepalived_config_path', 'value': '/etc/keepalived/keepalived.conf', 'section': 'keepalived', 'desc': 'Path to the main Keepalived configuration file', 'group': '1'}, + {'param': 'keepalived_path_logs', 'value': '/var/log/keepalived/', 'section': 'keepalived', 'desc': 'The path for Keepalived logs', 'group': '1'}, {'param': 'mail_ssl', 'value': '0', 'section': 'mail', 'desc': 'Enable TLS', 'group': '1'}, {'param': 'mail_from', 'value': '', 'section': 'mail', 'desc': 'Address of sender', 'group': '1'}, {'param': 'mail_smtp_host', 'value': '', 'section': 'mail', 'desc': 'SMTP server address', 'group': '1'}, diff --git a/app/modules/db/sql.py b/app/modules/db/sql.py index bb010dd1..1023fe50 100755 --- a/app/modules/db/sql.py +++ b/app/modules/db/sql.py @@ -176,101 +176,63 @@ def add_setting_for_new_group(group_id): data_source = [ {'param': 'time_zone', 'value': 'UTC', 'section': 'main', 'desc': 'Time Zone', 'group': group_id}, {'param': 'proxy', 'value': '', 'section': 'main', - 'desc': 'IP address and port of the proxy server . Use proto://ip:port', - 'group': group_id}, - {'param': 'session_ttl', 'value': '5', 'section': 'main', 'desc': 'TTL for a user session (in days)', - 'group': group_id}, - {'param': 'token_ttl', 'value': '5', 'section': 'main', 'desc': 'TTL for a user token (in days)', - 'group': group_id}, + 'desc': 'IP address and port of the proxy server . Use proto://ip:port', 'group': group_id}, + {'param': 'session_ttl', 'value': '5', 'section': 'main', 'desc': 'TTL for a user session (in days)', 'group': group_id}, + {'param': 'token_ttl', 'value': '5', 'section': 'main', 'desc': 'TTL for a user token (in days)', 'group': group_id}, {'param': 'tmp_config_path', 'value': '/tmp/', 'section': 'main', 'desc': 'Path to the temporary directory. A valid path should be specified as the value of this parameter. ' - 'The directory must be owned by the user specified in SSH settings', - 'group': group_id}, + 'The directory must be owned by the user specified in SSH settings', 'group': group_id}, {'param': 'cert_path', 'value': '/etc/ssl/certs/', 'section': 'main', - 'desc': 'Path to SSL dir. Folder owner must be a user which set in the SSH settings. The path must be valid', - 'group': group_id}, + 'desc': 'Path to SSL dir. Folder owner must be a user which set in the SSH settings. The path must be valid', 'group': group_id}, {'param': 'haproxy_path_logs', 'value': '/var/log/haproxy/', 'section': 'haproxy', 'desc': 'The default local path for saving logs', 'group': group_id}, {'param': 'syslog_server_enable', 'value': '0', 'section': 'logs', 'desc': 'Enable getting logs from a syslog server; (0 - no, 1 - yes)', 'group': group_id}, - {'param': 'syslog_server', 'value': '', 'section': 'logs', 'desc': 'IP address of the syslog_server', - 'group': group_id}, + {'param': 'syslog_server', 'value': '', 'section': 'logs', 'desc': 'IP address of the syslog_server', 'group': group_id}, {'param': 'stats_user', 'value': 'admin', 'section': 'haproxy', - 'desc': 'Username for accessing HAProxy stats page', - 'group': group_id}, + 'desc': 'Username for accessing HAProxy stats page', 'group': group_id}, {'param': 'stats_password', 'value': 'password', 'section': 'haproxy', 'desc': 'Password for accessing HAProxy stats page', 'group': group_id}, - {'param': 'stats_port', 'value': '8085', 'section': 'haproxy', 'desc': 'Port for HAProxy stats page', - 'group': group_id}, - {'param': 'stats_page', 'value': 'stats', 'section': 'haproxy', 'desc': 'URI for HAProxy stats page', - 'group': group_id}, - {'param': 'haproxy_dir', 'value': '/etc/haproxy', 'section': 'haproxy', 'desc': 'Path to the HAProxy directory', - 'group': group_id}, - {'param': 'haproxy_config_path', 'value': '/etc/haproxy/haproxy.cfg', 'section': 'haproxy', - 'desc': 'Path to the HAProxy configuration file', - 'group': group_id}, - {'param': 'server_state_file', 'value': '/etc/haproxy/haproxy.state', 'section': 'haproxy', - 'desc': 'Path to the HAProxy state file', - 'group': group_id}, - {'param': 'haproxy_sock', 'value': '/var/run/haproxy.sock', 'section': 'haproxy', - 'desc': 'Path to the HAProxy sock file', 'group': group_id}, - {'param': 'haproxy_sock_port', 'value': '1999', 'section': 'haproxy', 'desc': 'Socket port for HAProxy', - 'group': group_id}, - {'param': 'maxmind_key', 'value': '', 'section': 'haproxy', - 'desc': 'License key for downloading GeoIP DB. You can create it on maxmind.com', - 'group': group_id}, - {'param': 'nginx_path_logs', 'value': '/var/log/nginx/', 'section': 'nginx', - 'desc': 'NGINX error log', 'group': group_id}, - {'param': 'nginx_stats_user', 'value': 'admin', 'section': 'nginx', - 'desc': 'Username for accessing NGINX stats page', - 'group': group_id}, - {'param': 'nginx_stats_password', 'value': 'password', 'section': 'nginx', - 'desc': 'Password for accessing NGINX stats page', 'group': group_id}, - {'param': 'nginx_stats_port', 'value': '8086', 'section': 'nginx', 'desc': 'Stats port for web page NGINX', - 'group': group_id}, - {'param': 'nginx_stats_page', 'value': 'stats', 'section': 'nginx', 'desc': 'URI Stats for web page NGINX', - 'group': group_id}, - {'param': 'nginx_dir', 'value': '/etc/nginx/', 'section': 'nginx', - 'desc': 'Path to the NGINX directory with config files', 'group': group_id}, - {'param': 'nginx_config_path', 'value': '/etc/nginx/nginx.conf', 'section': 'nginx', - 'desc': 'Path to the main NGINX configuration file', 'group': group_id}, + {'param': 'stats_port', 'value': '8085', 'section': 'haproxy', 'desc': 'Port for HAProxy stats page', 'group': group_id}, + {'param': 'stats_page', 'value': 'stats', 'section': 'haproxy', 'desc': 'URI for HAProxy stats page', 'group': group_id}, + {'param': 'haproxy_dir', 'value': '/etc/haproxy', 'section': 'haproxy', 'desc': 'Path to the HAProxy directory', 'group': group_id}, + {'param': 'haproxy_config_path', 'value': '/etc/haproxy/haproxy.cfg', 'section': 'haproxy', 'desc': 'Path to the HAProxy configuration file', 'group': group_id}, + {'param': 'server_state_file', 'value': '/etc/haproxy/haproxy.state', 'section': 'haproxy', 'desc': 'Path to the HAProxy state file', 'group': group_id}, + {'param': 'haproxy_sock', 'value': '/var/run/haproxy.sock', 'section': 'haproxy', 'desc': 'Path to the HAProxy sock file', 'group': group_id}, + {'param': 'haproxy_sock_port', 'value': '1999', 'section': 'haproxy', 'desc': 'Socket port for HAProxy', 'group': group_id}, + {'param': 'haproxy_container_name', 'value': 'haproxy', 'section': 'haproxy', 'desc': 'Docker container name for HAProxy service', 'group': group_id}, + {'param': 'maxmind_key', 'value': '', 'section': 'main', + 'desc': 'License key for downloading GeoIP DB. You can create it on maxmind.com', 'group': group_id}, + {'param': 'nginx_path_logs', 'value': '/var/log/nginx/', 'section': 'nginx', 'desc': 'NGINX error log', 'group': group_id}, + {'param': 'nginx_stats_user', 'value': 'admin', 'section': 'nginx', 'desc': 'Username for accessing NGINX stats page', 'group': group_id}, + {'param': 'nginx_stats_password', 'value': 'password', 'section': 'nginx', 'desc': 'Password for accessing NGINX stats page', 'group': group_id}, + {'param': 'nginx_stats_port', 'value': '8086', 'section': 'nginx', 'desc': 'Stats port for web page NGINX', 'group': group_id}, + {'param': 'nginx_stats_page', 'value': 'stats', 'section': 'nginx', 'desc': 'URI Stats for web page NGINX', 'group': group_id}, + {'param': 'nginx_dir', 'value': '/etc/nginx/', 'section': 'nginx', 'desc': 'Path to the NGINX directory with config files', 'group': group_id}, + {'param': 'nginx_config_path', 'value': '/etc/nginx/nginx.conf', 'section': 'nginx', 'desc': 'Path to the main NGINX configuration file', 'group': group_id}, + {'param': 'nginx_container_name', 'value': 'nginx', 'section': 'nginx', 'desc': 'Docker container name for NGINX service', 'group': group_id}, {'param': 'ldap_enable', 'value': '0', 'section': 'ldap', 'desc': 'Enable LDAP', 'group': group_id}, {'param': 'ldap_server', 'value': '', 'section': 'ldap', 'desc': 'IP address of the LDAP server', 'group': group_id}, - {'param': 'ldap_port', 'value': '389', 'section': 'ldap', - 'desc': 'LDAP port (port 389 or 636 is used by default)', 'group': group_id}, - {'param': 'ldap_user', 'value': '', 'section': 'ldap', - 'desc': 'LDAP username. Format: user@domain.com', 'group': group_id}, + {'param': 'ldap_port', 'value': '389', 'section': 'ldap', 'desc': 'LDAP port (port 389 or 636 is used by default)', 'group': group_id}, + {'param': 'ldap_user', 'value': '', 'section': 'ldap', 'desc': 'LDAP username. Format: user@domain.com', 'group': group_id}, {'param': 'ldap_password', 'value': '', 'section': 'ldap', 'desc': 'LDAP password', 'group': group_id}, - {'param': 'ldap_base', 'value': '', 'section': 'ldap', 'desc': 'Base domain. Example: dc=domain, dc=com', - 'group': group_id}, + {'param': 'ldap_base', 'value': '', 'section': 'ldap', 'desc': 'Base domain. Example: dc=domain, dc=com', 'group': group_id}, {'param': 'ldap_domain', 'value': '', 'section': 'ldap', 'desc': 'LDAP domain for logging in', 'group': group_id}, - {'param': 'ldap_class_search', 'value': 'user', 'section': 'ldap', 'desc': 'Class for searching the user', - 'group': group_id}, - {'param': 'ldap_user_attribute', 'value': 'sAMAccountName', 'section': 'ldap', - 'desc': 'Attribute to search users by', 'group': group_id}, - {'param': 'ldap_search_field', 'value': 'mail', 'section': 'ldap', - 'desc': 'User\'s email address', 'group': group_id}, + {'param': 'ldap_class_search', 'value': 'user', 'section': 'ldap', 'desc': 'Class for searching the user', 'group': group_id}, + {'param': 'ldap_user_attribute', 'value': 'sAMAccountName', 'section': 'ldap', 'desc': 'Attribute to search users by', 'group': group_id}, + {'param': 'ldap_search_field', 'value': 'mail', 'section': 'ldap', 'desc': 'User\'s email address', 'group': group_id}, {'param': 'ldap_type', 'value': '0', 'section': 'ldap', 'desc': 'Use LDAPS', 'group': group_id}, - {'param': 'apache_path_logs', 'value': '/var/log/httpd/', 'section': 'apache', - 'desc': 'The path for Apache logs', 'group': group_id}, - {'param': 'apache_stats_user', 'value': 'admin', 'section': 'apache', - 'desc': 'Username for accessing Apache stats page', 'group': group_id}, - {'param': 'apache_stats_password', 'value': 'password', 'section': 'apache', - 'desc': 'Password for Apache stats webpage', 'group': group_id}, - {'param': 'apache_stats_port', 'value': '8087', 'section': 'apache', 'desc': 'Stats port for webpage Apache', - 'group': group_id}, - {'param': 'apache_stats_page', 'value': 'stats', 'section': 'apache', 'desc': 'URI Stats for webpage Apache', - 'group': group_id}, - {'param': 'apache_dir', 'value': '/etc/httpd/', 'section': 'apache', - 'desc': 'Path to the Apache directory with config files', 'group': group_id}, - {'param': 'apache_config_path', 'value': '/etc/httpd/conf/httpd.conf', 'section': 'apache', - 'desc': 'Path to the main Apache configuration file', 'group': group_id}, - {'param': 'apache_container_name', 'value': 'apache', 'section': 'apache', - 'desc': 'Docker container name for Apache service', 'group': group_id}, + {'param': 'apache_path_logs', 'value': '/var/log/httpd/', 'section': 'apache', 'desc': 'The path for Apache logs', 'group': group_id}, + {'param': 'apache_stats_user', 'value': 'admin', 'section': 'apache', 'desc': 'Username for accessing Apache stats page', 'group': group_id}, + {'param': 'apache_stats_password', 'value': 'password', 'section': 'apache', 'desc': 'Password for Apache stats webpage', 'group': group_id}, + {'param': 'apache_stats_port', 'value': '8087', 'section': 'apache', 'desc': 'Stats port for webpage Apache', 'group': group_id}, + {'param': 'apache_stats_page', 'value': 'stats', 'section': 'apache', 'desc': 'URI Stats for webpage Apache', 'group': group_id}, + {'param': 'apache_dir', 'value': '/etc/httpd/', 'section': 'apache', 'desc': 'Path to the Apache directory with config files', 'group': group_id}, + {'param': 'apache_config_path', 'value': '/etc/httpd/conf/httpd.conf', 'section': 'apache', 'desc': 'Path to the main Apache configuration file', 'group': group_id}, + {'param': 'apache_container_name', 'value': 'apache', 'section': 'apache', 'desc': 'Docker container name for Apache service', 'group': group_id}, {'param': 'keepalived_config_path', 'value': '/etc/keepalived/keepalived.conf', 'section': 'keepalived', 'desc': 'Path to the main Keepalived configuration file', 'group': group_id}, - {'param': 'keepalived_path_logs', 'value': '/var/log/keepalived/', 'section': 'keepalived', - 'desc': 'The path for Keepalived logs', 'group': group_id}, + {'param': 'keepalived_path_logs', 'value': '/var/log/keepalived/', 'section': 'keepalived', 'desc': 'The path for Keepalived logs', 'group': group_id}, ] try: