Skip to content

Commit

Permalink
apache: create APACHE_RUN_DIR and APACHE_LOCK_DIR if they're defined
Browse files Browse the repository at this point in the history
  • Loading branch information
oalbrigt committed Jun 15, 2018
1 parent 41961be commit 3670a78
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions heartbeat/apache
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3670a78

Please sign in to comment.