Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apache: create APACHE_RUN_DIR and APACHE_LOCK_DIR if they're defined #1158

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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