# Specify profile option names and expected values as arrays
PROFILE_OPTION_NAMES=(
"POS_INTERNAL_URL"
"POS_EXTERNAL_URL"
"APPS_AUTH_AGENT"
)
PROFILE_OPTION_VALUES=(
"http://internal.example.com"
"https://external.example.com"
"http://auth.example.com"
)
# Loop through profile option names and check their values
for (( i=0; i<${#PROFILE_OPTION_NAMES[@]}; i++ )); do
PROFILE_OPTION_NAME="${PROFILE_OPTION_NAMES[i]}"
EXPECTED_VALUE="${PROFILE_OPTION_VALUES[i]}"
# Get current value of profile option
CURRENT_VALUE=$(sqlplus -s username/password << EOF
set heading off feedback off verify off
select PROFILE_OPTION_VALUE from FND_PROFILE_OPTION_VALUES where PROFILE_OPTION_NAME='$PROFILE_OPTION_NAME';
exit;
EOF
)
# Check if the value matches the expected value
if [[ "$CURRENT_VALUE" == "$EXPECTED_VALUE" ]]; then
# Value is correct
MESSAGE+="Profile option '$PROFILE_OPTION_NAME' has the expected value '$EXPECTED_VALUE'<br>"
else
# Value is incorrect
MESSAGE+="Profile option '$PROFILE_OPTION_NAME' has an incorrect value. Expected '$EXPECTED_VALUE', but found '$CURRENT_VALUE'<br>"
COLOR="red"
fi
done
No comments:
Post a Comment