fix travis error during build Nginx

This commit is contained in:
joglomedia
2019-11-26 07:30:59 +07:00
parent e4b65eecce
commit ffa6320bf4
2 changed files with 15 additions and 8 deletions

View File

@@ -569,8 +569,15 @@ function init_nginx_install() {
fi
# Execute nginx from source installer.
run bash "${SCRIPTS_DIR}/install_nginx_from_source.sh" -v latest-stable -n "${NGX_VERSION}" --dynamic-module \
--extra-modules -b "${BUILD_DIR}" -a "${NGX_CONFIGURE_ARGS}" -y
if [ -f "${SCRIPTS_DIR}/install_nginx_from_source.sh" ]; then
run "${SCRIPTS_DIR}/install_nginx_from_source.sh" -v latest-stable -n "${NGX_VERSION}" --dynamic-module \
--extra-modules -b "${BUILD_DIR}" -a "${NGX_CONFIGURE_ARGS}" -y
elif [ -f ".${SCRIPTS_DIR}/install_nginx_from_source.sh" ]; then
run ".${SCRIPTS_DIR}/install_nginx_from_source.sh" -v latest-stable -n "${NGX_VERSION}" --dynamic-module \
--extra-modules -b "${BUILD_DIR}" -a "${NGX_CONFIGURE_ARGS}" -y
else
error "Nginx from source installer not found."
fi
fi
echo "Configuring NGiNX extra modules..."

View File

@@ -9,8 +9,8 @@ nginx_stable_version="1.16.1"
nginx_latest_version="1.17.6"
# Source the helper functions.
if [ -f "./scripts/helper.sh" ]; then
source ./scripts/helper.sh
if [ -f scripts/helper.sh ]; then
source scripts/helper.sh
init_log
init_config
else
@@ -37,7 +37,7 @@ testEqualityGetReleaseName()
testEqualityCreateAccount()
{
release_name=$(sudo create_account lemper)
release_name=$(create_account lemper)
assertEquals "Username lemper created." "${release_name}"
}
@@ -55,7 +55,7 @@ testEqualityGetNginxLatestVersion()
testEqualityInstallNginx()
{
. ./scripts/install_nginx.sh
. scripts/install_nginx.sh
nginx_bin=$(command -v nginx)
assertEquals "/usr/sbin/nginx" "${nginx_bin}"
@@ -63,7 +63,7 @@ testEqualityInstallNginx()
testEqualityInstallPhp()
{
. ./scripts/install_php.sh
. scripts/install_php.sh
php_bin=$(command -v php)
assertEquals "/usr/bin/php" "${php_bin}"
@@ -71,7 +71,7 @@ testEqualityInstallPhp()
testEqualityInstallMySQL()
{
. ./scripts/install_mariadb.sh
. scripts/install_mariadb.sh
mysql_bin=$(command -v mysql)
assertEquals "/usr/bin/mysql" "${mysql_bin}"