allow users to pass arguments to httpd

This commit is contained in:
Sameer Naik
2015-09-30 21:31:29 +05:30
parent 720912dab1
commit b6d6568e8d
2 changed files with 9 additions and 1 deletions

View File

@@ -1,5 +1,13 @@
#!/bin/bash
if [ "${1:0:1}" = '-' ]; then
export EXTRA_OPTIONS="$@"
set --
elif [ "${1}" == "httpd" -o "${1}" == "$(which httpd)" ]; then
export EXTRA_OPTIONS="${@:2}"
set --
fi
if [ -n "${1}" ]; then
touch /etc/services.d/$BITNAMI_APP_NAME/down
fi

View File

@@ -5,4 +5,4 @@ source $BITNAMI_PREFIX/bitnami-utils.sh
# Remove zombie pidfile
rm -f $BITNAMI_APP_DIR/logs/httpd.pid
exec httpd -DFOREGROUND -f $BITNAMI_APP_DIR/conf/httpd.conf
exec httpd -DFOREGROUND -f $BITNAMI_APP_DIR/conf/httpd.conf ${EXTRA_OPTIONS:+"$EXTRA_OPTIONS"}