Ajout de zabbix-init.service

This commit is contained in:
root 2020-04-28 23:20:17 +02:00
parent 19dad1c5aa
commit d9b2f97181
2 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,7 @@ EOF
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u${DB_USER} -p${DB_PASSWORD} ${DB_NAME}
echo "DBPassword=${DB_PASSWORD}" >> /etc/zabbix/zabbix_server.conf.d/db.conf
sed -i "s@^\$DB['PASSWORD'].*$@\$DB['PASSWORD'] = \'${DB_PASSWORD}\';@g" /etc/zabbix/web/zabbix.conf.php
systemctl --now enable zabbix-server zabbix-agent nginx php7.3-fpm

View File

@ -0,0 +1,12 @@
[Unit]
# The script needs to execute after:
# network interfaces are configured
Wants=mariadb.service
After=mariadb.service
[Service]
Type=oneshot
ExecStart=/etc/zabbix/init_zabbix.sh
[Install]
WantedBy=multi-user.target