From 3670a78ce2e3501b2cb9733f5737e7d798afd8bd Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Tue, 12 Jun 2018 14:49:59 +0200 Subject: [PATCH] apache: create APACHE_RUN_DIR and APACHE_LOCK_DIR if they're defined --- heartbeat/apache | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/heartbeat/apache b/heartbeat/apache index fd8ea34135..d8689e11ea 100755 --- a/heartbeat/apache +++ b/heartbeat/apache @@ -204,6 +204,15 @@ apache_start() { validate_default_config || return $OCF_ERR_CONFIGURED + if [ -n "${APACHE_RUN_DIR}" ] && [ ! -d "${APACHE_RUN_DIR}" ]; then + mkdir -p "${APACHE_RUN_DIR}" + fi + + if [ -n "${APACHE_LOCK_DIR}" ] && [ ! -d "${APACHE_LOCK_DIR}" ]; then + mkdir -p "${APACHE_LOCK_DIR}" + chown "${APACHE_RUN_USER}" "${APACHE_LOCK_DIR}" + fi + if [ -z $PIDFILE_DIRECTIVE ]; then ocf_run $HTTPD $HTTPDOPTS $OPTIONS -f $CONFIGFILE else