only perform LDAP change when database enabled

Correct service name for postgresql to postgresqld as well