fix: check for 32 bits before installing/starting

This commit is contained in:
Nicolas Meienberger 2023-02-25 12:27:02 +01:00
parent 2cbbd9373c
commit 6e61e31440
2 changed files with 13 additions and 6 deletions

View file

@ -4,6 +4,15 @@ set -o nounset
set -o pipefail
echo "Installing runtipi..."
ARCHITECTURE="$(uname -m)"
# Not supported on 32 bits systems
if [[ "$ARCHITECTURE" == "armv7"* ]] || [[ "$ARCHITECTURE" == "i686" ]] || [[ "$ARCHITECTURE" == "i386" ]]; then
echo "runtipi is not supported on 32 bits systems"
exit 1
fi
LATEST_VERSION=$(curl -s https://api.github.com/repos/meienberger/runtipi/releases/latest | grep tag_name | cut -d '"' -f4)
### --------------------------------

View file

@ -43,7 +43,7 @@ NGINX_PORT_SSL=443
DOMAIN=tipi.localhost
SED_ROOT_FOLDER="$(echo "$ROOT_FOLDER" | sed 's/\//\\\//g')"
DNS_IP="9.9.9.9" # Default to Quad9 DNS
ARCHITECTURE="$(uname -m)"
ARCHITECTURE="$(uname -m | tr '[:upper:]' '[:lower:]')"
apps_repository="https://github.com/meienberger/runtipi-appstore"
REPO_ID="$("${ROOT_FOLDER}"/scripts/git.sh get_hash ${apps_repository})"
APPS_REPOSITORY_ESCAPED="$(echo ${apps_repository} | sed 's/\//\\\//g')"
@ -59,17 +59,15 @@ STORAGE_PATH_ESCAPED="$(echo "${storage_path}" | sed 's/\//\\\//g')"
REDIS_HOST=tipi-redis
INTERNAL_IP=
if [[ "$ARCHITECTURE" == "aarch64" ]]; then
if [[ "$ARCHITECTURE" == "aarch64" ]] || [[ "$ARCHITECTURE" == "armv8"* ]]; then
ARCHITECTURE="arm64"
elif [[ "$ARCHITECTURE" == "armv7"* || "$ARCHITECTURE" == "armv8"* ]]; then
ARCHITECTURE="arm"
elif [[ "$ARCHITECTURE" == "x86_64" ]]; then
ARCHITECTURE="amd64"
fi
# If none of the above conditions are met, the architecture is not supported
if [[ "$ARCHITECTURE" != "arm64" ]] && [[ "$ARCHITECTURE" != "arm" ]] && [[ "$ARCHITECTURE" != "amd64" ]]; then
echo "Architecture ${ARCHITECTURE} not supported!"
if [[ "$ARCHITECTURE" != "arm64" ]] && [[ "$ARCHITECTURE" != "amd64" ]]; then
echo "Architecture ${ARCHITECTURE} not supported if you think this is a mistake, please open an issue on GitHub."
exit 1
fi