Compare commits

...

4 Commits

Author SHA1 Message Date
tteckster 5e5e2c96a5 Update CHANGELOG.md 2024-06-11 15:47:26 -04:00
tteckster 7ea8bdfb95 Update zabbix-install.sh
tweak
2024-06-11 15:25:47 -04:00
tteckster 79b138cc6d Update zabbix-install.sh
tweak
2024-06-11 14:19:41 -04:00
tteckster fd114369e9 Update zabbix-install.sh
Escape Special Characters
2024-06-11 13:50:59 -04:00
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -9,6 +9,13 @@
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
## 2024-06-11
### Changed
- **Zabbix LXC**
- NEW Script
## 2024-06-06
### Changed
+2 -2
View File
@@ -31,13 +31,13 @@ msg_info "Setting up PostgreSQL"
$STD apt-get install -y postgresql
DB_NAME=zabbixdb
DB_USER=zabbix
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
$STD zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null
sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf
sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf
sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf