diff --git a/conf/arm.src b/conf/arm-7.src similarity index 100% rename from conf/arm.src rename to conf/arm-7.src diff --git a/conf/systemd.service b/conf/systemd.service index 8151764..7d424a4 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/gotify-linux-amd64 +ExecStart=__FINALPATH__/gotify-linux-__ARCHITECTURE__ [Install] WantedBy=multi-user.target diff --git a/scripts/_common.sh b/scripts/_common.sh index c104bf7..6638067 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -12,11 +12,13 @@ ynh_delete_file_checksum () { ynh_app_setting_delete $app $checksum_setting_name } -if [ -n "$(uname -m | grep 64)" ]; then +if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then + architecture="arm64" +elif [ -n "$(uname -m | grep 64)" ]; then architecture="amd64" elif [ -n "$(uname -m | grep arm)" ]; then - architecture="arm" + architecture="arm-7" else ynh_die "Unable to detect your achitecture, please open a bug describing \ your hardware and the result of the command \"uname -m\"." 1 -fi +fi \ No newline at end of file diff --git a/scripts/install b/scripts/install index 0735709..b45f828 100755 --- a/scripts/install +++ b/scripts/install @@ -107,6 +107,7 @@ ynh_system_user_create $app #================================================= # Create a dedicated systemd config +ynh_replace_string "__ARCHITECTURE__" $architecture "../conf/systemd.service" ynh_add_systemd_config #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 67c663e..e517fb7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -129,6 +129,7 @@ ynh_store_file_checksum "$final_path/config.yml" #================================================= # Create a dedicated systemd config +ynh_replace_string "__ARCHITECTURE__" $architecture "../conf/systemd.service" ynh_add_systemd_config #=================================================