File: //sbin/init-scripts/prestart/httpd-error-log.sh
#!/bin/bash
if [[ -n "$X_APPLICATION_HTTP_SERVER" && "$X_APPLICATION_HTTP_SERVER" != "httpd" ]]; then
exit 0;
fi
ERROR_LOG_ENABLED=""
case "$(echo $X_APPLICATION_ERROR_LOG | tr a-z A-Z)" in
ON) ERROR_LOG_ENABLED=1;;
TRUE) ERROR_LOG_ENABLED=1;;
YES) ERROR_LOG_ENABLED=1;;
ENABLED) ERROR_LOG_ENABLED=1;;
1) ERROR_LOG_ENABLED=1;;
esac
if [ "$ERROR_LOG_ENABLED" == "1" ]; then
echo "
ErrorLog \"|| /usr/sbin/httpd-error-logger.sh\"
" >"/var/local/httpd/09-errorlog.conf"
else
echo "
ErrorLog /dev/null
" >"/var/local/httpd/09-errorlog.conf"
fi
exit 0