-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathfeatures.sh
executable file
·40 lines (31 loc) · 1.36 KB
/
features.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
if [[ "$FEATURES_VERBOSE" == "true" && "$VERBOSE" != "true" ]]; then
echo "WARNING: 'FEATURES_VERBOSE' is 'true' but 'VERBOSE' is 'false'. featureUtility verbose output will be suppressed"
fi
. /opt/ol/helpers/build/internal/logger.sh
set -Eeox pipefail
##Define variables for XML snippets source and target paths
SNIPPETS_SOURCE=/opt/ol/helpers/build/configuration_snippets
SNIPPETS_TARGET=/config/configDropins/overrides
SNIPPETS_TARGET_DEFAULTS=/config/configDropins/defaults
mkdir -p ${SNIPPETS_TARGET}
mkdir -p ${SNIPPETS_TARGET_DEFAULTS}
# Session Caching
if [ -n "$INFINISPAN_SERVICE_NAME" ] || [ "${HZ_SESSION_CACHE}" == "client" ] || [ "${HZ_SESSION_CACHE}" == "embedded" ]; then
cp ${SNIPPETS_SOURCE}/sessioncache-features.xml ${SNIPPETS_TARGET}/sessioncache-features.xml
chmod g+rw $SNIPPETS_TARGET/sessioncache-features.xml
fi
# SSO
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
fi
# Key Store
if [ "$SSL" == "true" ] || [ "$TLS" == "true" ]; then
cp $SNIPPETS_SOURCE/tls.xml $SNIPPETS_TARGET/tls.xml
fi
# Install necessary features using featureUtility
if [ "$FEATURES_VERBOSE" == "true" ]; then
verbose="--verbose"
fi
featureUtility installServerFeatures --acceptLicense defaultServer --noCache $verbose
find /opt/ol/wlp/lib /opt/ol/wlp/bin ! -perm -g=rw -print0 | xargs -0 -r chmod g+rw