diff --git a/lib/ulib/apache b/lib/ulib/apache index 75d16f2..dbb4969 100644 --- a/lib/ulib/apache +++ b/lib/ulib/apache @@ -135,6 +135,14 @@ function get_default_apachesitesdir_prefix() { fi } +function get_default_htdocsbase_prefix() { + if check_sysinfos -s darwin; then + __apache_prefixes_checkdir /Library/WebServer/Documents + elif check_sysinfos -s linux; then + __apache_prefixes_checkdir /var/www + fi +} + function get_default_htdocsdir_prefix() { if check_sysinfos -s darwin; then __apache_prefixes_checkdir /Library/WebServer/Documents @@ -178,12 +186,13 @@ function __compute_apache_prefixes() { APACHECONF="${APACHECONF:-$(get_default_apacheconf_prefix)}" APACHEAVSITESDIR="${APACHEAVSITESDIR:-$(get_default_apacheavsitesdir_prefix)}" APACHESITESDIR="${APACHESITESDIR:-$(get_default_apachesitesdir_prefix)}" + HTDOCSBASE="${HTDOCSBASE:-$(get_default_htdocsbase_prefix)}" HTDOCSDIR="${HTDOCSDIR:-$(get_default_htdocsdir_prefix)}" CGIBINDIR="${CGIBINDIR:-$(get_default_cgibindir_prefix)}" __apache_prefixes=1 } -APACHE_PREFIXES=(APACHEBIN APACHEVERSION APACHECTL APACHELOGDIR APACHESSLCERTSDIR APACHESSLKEYSDIR APACHECONFDIR APACHECONF APACHEAVSITESDIR APACHESITESDIR HTDOCSDIR CGIBINDIR) +APACHE_PREFIXES=(APACHEBIN APACHEVERSION APACHECTL APACHELOGDIR APACHESSLCERTSDIR APACHESSLKEYSDIR APACHECONFDIR APACHECONF APACHEAVSITESDIR APACHESITESDIR HTDOCSBASE HTDOCSDIR CGIBINDIR) UTOOLS_PREFIXES=("${UTOOLS_PREFIXES[@]}" "${APACHE_PREFIXES[@]}") function compute_apache_prefixes() { @@ -249,6 +258,11 @@ function get_APACHESITESDIR_prefix() { echo "$APACHESITESDIR" } +function get_HTDOCSBASE_prefix() { + __compute_apache_prefixes + echo "$HTDOCSBASE" +} + function get_HTDOCSDIR_prefix() { __compute_apache_prefixes echo "$HTDOCSDIR"