Skip to content

Commit

Permalink
Merge pull request #98 from joglomedia/2.x.x
Browse files Browse the repository at this point in the history
2.x.x
  • Loading branch information
joglomedia authored Aug 13, 2021
2 parents d9a52bd + 41e7442 commit 5045035
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
13 changes: 1 addition & 12 deletions scripts/install_mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function add_mongodb_repo() {
RELEASE_NAME=${RELEASE_NAME:-$(get_release_name)}
MONGODB_VERSION=${MONGODB_VERSION:-"5.0"}

[ "${RELEASE_NAME}" == "jessie" ] && MONGODB_VERSION="4.4"
[[ "${RELEASE_NAME}" == "jessie" || "${RELEASE_NAME}" == "xenial" ]] && MONGODB_VERSION="4.4"

local DISTRIB_ARCH
case ${ARCH} in
Expand All @@ -44,17 +44,6 @@ function add_mongodb_repo() {

case ${DISTRIB_NAME} in
debian)
#case ${RELEASE_NAME} in
# "buster")
# MONGODB_VERSION="4.2" # Only v4.2 supported for Buster
# ;;
# "jessie")
# if version_older_than "4.1" "${MONGODB_VERSION}"; then
# MONGODB_VERSION="4.1"
# fi
# ;;
#esac

if [ ! -f "/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}-${RELEASE_NAME}.list" ]; then
run touch "/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}-${RELEASE_NAME}.list"
run bash -c "echo 'deb [ arch=${DISTRIB_ARCH} ] https://repo.mongodb.org/apt/debian ${RELEASE_NAME}/mongodb-org/${MONGODB_VERSION} main' > /etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}-${RELEASE_NAME}.list"
Expand Down
10 changes: 7 additions & 3 deletions scripts/install_nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if [ "$(type -t run)" != "function" ]; then
BASEDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )
# shellcheck disable=SC1091
source "${BASEDIR}/helper.sh"
. "${BASEDIR}/helper.sh"
fi

# Define scripts directory.
Expand Down Expand Up @@ -39,6 +39,9 @@ function add_nginx_repo() {
DISTRIB_NAME=${DISTRIB_NAME:-$(get_distrib_name)}
RELEASE_NAME=${RELEASE_NAME:-$(get_release_name)}

#local ALTERNATIVE_REPO=false
#[[ "${RELEASE_NAME}" == "jessie" || "${RELEASE_NAME}" == "xenial" ]] && ALTERNATIVE_REPO=true

case "${DISTRIB_NAME}" in
debian)
if [ ! -f "/etc/apt/sources.list.d/ondrej-${NGINX_REPO}-${RELEASE_NAME}.list" ]; then
Expand Down Expand Up @@ -272,8 +275,8 @@ function init_nginx_install() {
fi
fi

# shellcheck disable=SC2068
run apt-get install -qq -y "${NGINX_PKG}" ${EXTRA_MODULE_PKGS[@]}
# Install Nginx and its modules.
run apt-get install -qq -y "${NGINX_PKG}" "${EXTRA_MODULE_PKGS[@]}"
fi
else
fail "Unable to install Nginx, this GNU/Linux distribution is not supported."
Expand Down Expand Up @@ -802,6 +805,7 @@ function init_nginx_install() {
fi

# NJS is a subset of the JavaScript language that allows extending nginx functionality.
# shellcheck disable=SC2153
if "${NGX_HTTP_JS}"; then
echo "Adding ngx-http-js module..."
run git clone https://github.com/nginx/njs.git
Expand Down

0 comments on commit 5045035

Please sign in to comment.