oehrlis / oudbase

OUD base environment scripts
Apache License 2.0
6 stars 1 forks source link

Error in oud_status.sh when LDAP connection handler is disable #86

Closed oehrlis closed 3 years ago

oehrlis commented 3 years ago

oud_status.sh does fail if LDAP connection handler is disabled.

oracle@test:/u00/app/oracle/local/oudbase/bin/ [oud_test] ./oud_status.sh -v
2020-08-26_04:37:17  INFO : Use current OUD instance
2020-08-26_04:37:17  START: Start of oud_status.sh (Version v1.8.5) with -v
2020-08-26_04:37:17  INFO : Touch temp file /tmp/oud_status.sh.7065
2020-08-26_04:37:17  INFO : Identify directory type OUD
2020-08-26_04:37:17  INFO : Run status on OUD Instance oud_test
2020-08-26_04:37:24  INFO : Process /tmp/oud_status.sh.7065 file
2020-08-26_04:37:24  INFO : Check connection handler LDAP

2020-08-26_04:37:24  ERR  : Exit Code 51. Connection Handler LDAP is not enabled on oud_test

Provide a functionality if LDAP is disabled.

oehrlis commented 3 years ago

Introduce a new Variable and command line parameter for oud_status.sh. Connection handler to verify can now be specified by OUD_CON_HANDLER or -c . By default LDAP and LDAPS will be verified. If OUD is just running with LDAPS you may either run oud_status.sh -v -c LDAPS to only check LDAPS or set the environment variable OUD_CON_HANDLER. The variable could also be set in the OUD instance specific config file `$ETC_BASE/oud..conf

Example:

oracle@test:/u00/app/oracle/local/oudbase/bin/ [oud_test] oud_status.sh -v -c LDAPS
2020-08-26_17:43:44  INFO : Use current OUD instance
2020-08-26_17:43:44  START: Start of oud_status.sh (Version v1.9.0) with -v -c LDAPS
2020-08-26_17:43:44  INFO : Touch temp file /tmp/tmp.WNty4FNRa6
2020-08-26_17:43:44  INFO : Identify directory type OUD
2020-08-26_17:43:44  INFO : Run status on OUD Instance oud_test
2020-08-26_17:43:53  INFO : Process /tmp/tmp.WNty4FNRa6 file
2020-08-26_17:43:53  INFO : Check connection handler LDAPS
2020-08-26_17:43:53  INFO : OK, status on OUD Instance oud_test
2020-08-26_17:43:53  END  : of oud_status.sh

Usage of oud_status.sh

Usage, oud_status.sh [-hvr] [-i <OUD_INSTANCE>][-D <bindDN>]
              [-j <bindPasswordFile>] [-c <CONNECTION HANDLER>]
    -h                       Usage this message
    -v                       enable verbose mode
    -l                       enable instance log file in $OUD_ADMIN_BASE/$OUD_INSTANCE/
    -r                       check for replication
    -D <bindDN>              Default value: cn=Directory Manager
    -j <bindPasswordFile>    Bind password file
    -c <CONNECTION HANDLER>  List of connection handler to check (default LDAP,LDAPS)
    -i <OUD_INSTANCE>        OUD Instance
    Logfile : /u01/log/oud_status.log