-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from devilbox/release-0.20
Upgrade vhost-gen and add PHP 5.2 compat mode
- Loading branch information
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -u | ||
set -o pipefail | ||
|
||
|
||
############################################################ | ||
# Functions | ||
############################################################ | ||
|
||
### | ||
### Ensure COMPAT is set | ||
### | ||
export_php_fpm_compat() { | ||
local varname="${1}" | ||
local debug="${2}" | ||
local value="0" | ||
|
||
if ! env_set "${varname}"; then | ||
log "info" "\$${varname} not set. Not enabling PHP 5.2 compatibility mode." "${debug}" | ||
# Ensure variable is exported | ||
eval "export ${varname}=0" | ||
else | ||
value="$( env_get "${varname}" )" | ||
if [ "${value}" = "5.2" ]; then | ||
log "info" "PHP 5.2 compatibility mode: Enabled" "${debug}" | ||
# Ensure variable is exported | ||
eval "export ${varname}=1" | ||
else | ||
log "info" "PHP 5.2 compatibility mode: Disabled" "${debug}" | ||
# Ensure variable is exported | ||
eval "export ${varname}=0" | ||
fi | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters