mirror of https://github.com/zulip/zulip.git
install: Add system_requirements_failure helper.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
b5e5728112
commit
37040ac49d
|
@ -49,6 +49,18 @@ Options:
|
|||
EOF
|
||||
}
|
||||
|
||||
system_requirements_failure() {
|
||||
set +x
|
||||
echo >&2
|
||||
cat >&2
|
||||
cat <<EOF >&2
|
||||
|
||||
For more information, see:
|
||||
https://zulip.readthedocs.io/en/latest/production/requirements.html
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Shell option parsing. Over time, we'll want to move some of the
|
||||
# environment variables below into this self-documenting system.
|
||||
args="$(getopt -o '' --long help,hostname:,email:,certbot,self-signed-cert,cacert:,postgresql-database-name:,postgresql-database-user:,postgresql-version:,postgresql-missing-dictionaries,no-init-db,no-overwrite-settings,no-dist-upgrade -n "$0" -- "$@")"
|
||||
|
@ -221,9 +233,7 @@ fi
|
|||
case "$os_id $os_version_id" in
|
||||
'debian 11' | 'debian 12' | 'ubuntu 20.04' | 'ubuntu 22.04') ;;
|
||||
*)
|
||||
set +x
|
||||
cat <<EOF
|
||||
|
||||
system_requirements_failure <<EOF
|
||||
Unsupported OS release: $os_id $os_version_id
|
||||
|
||||
Zulip in production is supported only on:
|
||||
|
@ -231,11 +241,7 @@ Zulip in production is supported only on:
|
|||
- Debian 12
|
||||
- Ubuntu 20.04 LTS
|
||||
- Ubuntu 22.04 LTS
|
||||
|
||||
For more information, see:
|
||||
https://zulip.readthedocs.io/en/latest/production/requirements.html
|
||||
EOF
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -245,19 +251,13 @@ has_universe() {
|
|||
}
|
||||
|
||||
if [ "$os_id" = ubuntu ] && ! has_universe && ! { apt-get update && has_universe; }; then
|
||||
set +x
|
||||
cat <<'EOF'
|
||||
|
||||
system_requirements_failure <<EOF
|
||||
You must enable the Ubuntu Universe repository before installing
|
||||
Zulip. You can do this with:
|
||||
|
||||
sudo add-apt-repository universe
|
||||
sudo apt update
|
||||
|
||||
For more information, see:
|
||||
https://zulip.readthedocs.io/en/latest/production/requirements.html
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case ",$PUPPET_CLASSES," in
|
||||
|
|
Loading…
Reference in New Issue