Browse Source

Add postgresql service to generateldif script

projet6062
Benoît S. 1 year ago
parent
commit
8ec4ac02b3
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      generate-ldif/templates/generateldif.sh.j2

+ 18
- 0
generate-ldif/templates/generateldif.sh.j2 View File

@@ -547,6 +547,24 @@ ServiceVersion: Elasticsearch ${elasticsearch_version}
EOT
fi

# PostgreSQL
if is_pkg_installed postgresql; then
postgresql_version=$(get_pkg_version postgresql)
fi
if [ -n "${postgresql_version}" ]; then
cat <<EOT >> "${ldif_file}"

dn: ServiceName=postgresql,${computer_dn}
NagiosEnabled: TRUE
ipServiceProtocol: tcp
objectClass: EvoService
ServiceName: postgresql
ipServicePort: 5432
ServiceType: database
ServiceVersion: PostgreSQL ${elasticsearch_version}
EOT
fi

# test if we have a stdout
if [ -t 1 ]; then
echo "Output is in ${ldif_file}"


Loading…
Cancel
Save