diff --git a/conf/arm.src b/conf/arm64.src similarity index 100% rename from conf/arm.src rename to conf/arm64.src diff --git a/scripts/detect_arch b/scripts/detect_arch index 20ab9dc..ba04b7e 100644 --- a/scripts/detect_arch +++ b/scripts/detect_arch @@ -1,14 +1,14 @@ #!/bin/bash -if [ -n "$(uname -m | grep x86_64)" ]; then +if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then + architecture="arm64" +elif [ -n "$(uname -m | grep 64)" ]; then architecture="x86-64" elif [ -n "$(uname -m | grep 86)" ]; then architecture="i386" elif [ -n "$(uname -m | grep arm)" ]; then architecture="arm" -elif [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm" else - ynh_die --message="Unable to detect your achitecture, please open a bug describing \ + ynh_die "Unable to detect your achitecture, please open a bug describing \ your hardware and the result of the command \"uname -m\"." 1 fi diff --git a/scripts/install b/scripts/install index c3af6fa..19f0bab 100755 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,12 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_print_info --message="Validating installation parameters..." +# Check machine architecture (in particular, we don't support ARM and 32bit machines) +if [ $architecture == "x86_64" ] && [ $architecture == "arm" ] +then + ynh_die --message="Sorry, but this app can only be installed on a x86, 64 bits machine :(" +fi + final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder"