diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 3eff37b1..156d49bb 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -102,7 +102,7 @@ if [[ ${RUN_AS_ROOT} =~ [Ff][Aa][Ll][Ss][Ee] ]];then dir_ownership=("${CATALINA_HOME}" /home/"${USER_NAME}"/ "${COMMUNITY_PLUGINS_DIR}" "${STABLE_PLUGINS_DIR}" "${GEOSERVER_HOME}" /usr/share/fonts/ /tomcat_apps.zip /tmp/ "${FOOTPRINTS_DATA_DIR}" "${CERT_DIR}" "${FONTS_DIR}" /scripts/ - "${EXTRA_CONFIG_DIR}" "/docker-entrypoint-geoserver.d") + "${EXTRA_CONFIG_DIR}" "/docker-entrypoint-geoserver.d" "${MONITOR_AUDIT_PATH}") for directory in "${dir_ownership[@]}"; do if [[ $(stat -c '%U' "${directory}") != "${USER_NAME}" ]] && [[ $(stat -c '%G' "${directory}") != "${GEO_GROUP_NAME}" ]];then chown -R "${USER_NAME}":"${GEO_GROUP_NAME}" "${directory}" diff --git a/scripts/functions.sh b/scripts/functions.sh index 5a35f4de..41e755d8 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -536,3 +536,23 @@ function entry_point_script { done fi } + +function setup_monitoring() { + +if [[ -f "${EXTRA_CONFIG_DIR}"/monitor.properties ]]; then + envsubst < "${EXTRA_CONFIG_DIR}"/monitor.properties > "${GEOSERVER_DATA_DIR}"/monitoring/monitor.properties +else + +cat > "${GEOSERVER_DATA_DIR}"/monitoring/monitor.properties <