generate-ldif: detect mdadm

This commit is contained in:
Ludovic Poujol 2021-09-16 17:26:58 +02:00
parent de4d814d74
commit f75354bb84
2 changed files with 20 additions and 2 deletions

View file

@ -16,7 +16,8 @@ The **patch** part changes incrementally at each release.
* apache: new variable for mpm mode (+ updated default config accordingly) * apache: new variable for mpm mode (+ updated default config accordingly)
* certbot: add script for manual deploy hooks execution * certbot: add script for manual deploy hooks execution
* evolinux-base: install molly-guard by default * evolinux-base: install molly-guard by default
* generate-ldid: detect hardware raid card * generate-ldif: detect hardware raid card
* generate-ldif: detect mdadm
* listupgrade: crontab is configurable * listupgrade: crontab is configurable
* mongodb: create munin plugins directory if missing * mongodb: create munin plugins directory if missing
* mysql: script "mysql_connections" to display a compact list of connections * mysql: script "mysql_connections" to display a compact list of connections

View file

@ -583,10 +583,27 @@ objectClass: EvoService
ServiceName: postgresql ServiceName: postgresql
ipServicePort: 5432 ipServicePort: 5432
ServiceType: database ServiceType: database
ServiceVersion: PostgreSQL ${elasticsearch_version} ServiceVersion: PostgreSQL ${postgresql_version}
EOT EOT
fi fi
# mdadm
if is_pkg_installed mdadm; then
mdadm_version=$(get_pkg_version mdadm)
fi
if [ -n "${mdadm_version}" ]; then
cat <<EOT >> "${ldif_file}"
dn: ServiceName=mdadm,${computer_dn}
NagiosEnabled: TRUE
objectClass: EvoService
ServiceName: mdadm
ServiceType: raid
ServiceVersion: mdadm ${mdadm_version}
EOT
fi
# test if we have a stdout # test if we have a stdout
if [ -t 1 ]; then if [ -t 1 ]; then
echo "Output is in ${ldif_file}" echo "Output is in ${ldif_file}"