mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
prod install: Use ID_LIKE to help select os family.
This commit is contained in:
@@ -100,8 +100,8 @@ export LANGUAGE="en_US.UTF-8"
|
|||||||
|
|
||||||
# Check for a supported OS release.
|
# Check for a supported OS release.
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
os_info="$(. /etc/os-release; printf '%s\n' "$ID" "$VERSION_ID" "$VERSION_CODENAME")"
|
os_info="$(. /etc/os-release; printf '%s\n' "$ID" "$ID_LIKE" "$VERSION_ID" "$VERSION_CODENAME")"
|
||||||
{ read -r os_id; read -r os_version_id; read -r os_version_codename; } <<< "$os_info"
|
{ read -r os_id; read -r os_id_like; read -r os_version_id; read -r os_version_codename; } <<< "$os_info"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$os_id$os_version_id" in
|
case "$os_id$os_version_id" in
|
||||||
@@ -155,12 +155,12 @@ if [ "$mem_kb" -lt 1900000 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Do package update, e.g. do `apt-get update` on Debian
|
# Do package update, e.g. do `apt-get update` on Debian
|
||||||
case "$os_id" in
|
case " $os_id $os_id_like " in
|
||||||
ubuntu|debian)
|
*' debian '*)
|
||||||
# setup-apt-repo does an `apt-get update`
|
# setup-apt-repo does an `apt-get update`
|
||||||
"$ZULIP_PATH"/scripts/lib/setup-apt-repo
|
"$ZULIP_PATH"/scripts/lib/setup-apt-repo
|
||||||
;;
|
;;
|
||||||
centos)
|
*' rhel '*)
|
||||||
"$ZULIP_PATH"/scripts/lib/setup-yum-repo
|
"$ZULIP_PATH"/scripts/lib/setup-yum-repo
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -195,8 +195,8 @@ fi
|
|||||||
# don't run dist-upgrade in one click apps to make the
|
# don't run dist-upgrade in one click apps to make the
|
||||||
# installation process more seamless.
|
# installation process more seamless.
|
||||||
if [ -z "$NO_DIST_UPGRADE" ]; then
|
if [ -z "$NO_DIST_UPGRADE" ]; then
|
||||||
case "$os_id" in
|
case " $os_id $os_id_like " in
|
||||||
ubuntu|debian)
|
*' debian '*)
|
||||||
apt-get -y dist-upgrade "${APT_OPTIONS[@]}"
|
apt-get -y dist-upgrade "${APT_OPTIONS[@]}"
|
||||||
;;
|
;;
|
||||||
# On CentOS, there is no need to do `yum -y upgrade` because `yum -y
|
# On CentOS, there is no need to do `yum -y upgrade` because `yum -y
|
||||||
@@ -204,8 +204,8 @@ if [ -z "$NO_DIST_UPGRADE" ]; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$os_id" in
|
case " $os_id $os_id_like " in
|
||||||
ubuntu|debian)
|
*' debian '*)
|
||||||
if ! apt-get install -y \
|
if ! apt-get install -y \
|
||||||
puppet git curl wget jq \
|
puppet git curl wget jq \
|
||||||
python python3 python-six python3-six crudini \
|
python python3 python-six python3-six crudini \
|
||||||
@@ -218,7 +218,7 @@ case "$os_id" in
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
centos)
|
*' rhel '*)
|
||||||
if ! yum install -y \
|
if ! yum install -y \
|
||||||
puppet git curl wget jq \
|
puppet git curl wget jq \
|
||||||
python python3 python-six python3-six crudini \
|
python python3 python-six python3-six crudini \
|
||||||
@@ -324,11 +324,11 @@ if [ -n "$REMOTE_POSTGRES" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# These server restarting bits should be moveable into puppet-land, ideally
|
# These server restarting bits should be moveable into puppet-land, ideally
|
||||||
case "$os_id" in
|
case " $os_id $os_id_like " in
|
||||||
ubuntu|debian)
|
*' debian '*)
|
||||||
apt-get -y upgrade
|
apt-get -y upgrade
|
||||||
;;
|
;;
|
||||||
centos)
|
*' rhel '*)
|
||||||
# No action is required because `yum update` already does upgrade.
|
# No action is required because `yum update` already does upgrade.
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user