Ajout de zabbix-init.service
This commit is contained in:
parent
19dad1c5aa
commit
d9b2f97181
@ -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
|
||||
|
||||
|
12
zabbix/zabbix-init.service
Normal file
12
zabbix/zabbix-init.service
Normal 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
|
Loading…
Reference in New Issue
Block a user