diff --git a/conf/x86-64.src b/conf/amd64.src similarity index 100% rename from conf/x86-64.src rename to conf/amd64.src diff --git a/conf/armv7.src b/conf/armhf.src similarity index 100% rename from conf/armv7.src rename to conf/armhf.src diff --git a/conf/nginx.conf b/conf/nginx.conf index fe4b9f3..066093b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,6 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__/; proxy_set_header Host $host; proxy_buffering off; diff --git a/manifest.json b/manifest.json index 3345c93..03cde0a 100644 --- a/manifest.json +++ b/manifest.json @@ -30,7 +30,7 @@ "mysql" ], "requirements": { - "yunohost": ">= 4.2.8" + "yunohost": ">= 4.3.0" }, "arguments": { "install" : [ diff --git a/scripts/_common.sh b/scripts/_common.sh index bc051ba..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,21 +15,3 @@ #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Detect the system architecture to download the right tarball -# NOTE: `uname -m` is more accurate and universal than `arch` -# See https://en.wikipedia.org/wiki/Uname -ynh_detect_arch(){ - local architecture - if [ -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="armv7" - else - ynh_die --message "Unable to detect your achitecture, please open a bug describing \ - your hardware and the result of the command \"uname -m\"." 1 - fi - echo $architecture -} diff --git a/scripts/install b/scripts/install index e4cb228..de268c9 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,7 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC -architecture=$(ynh_detect_arch) +architecture=$YNH_ARCH key=$(ynh_string_random) app=$YNH_APP_INSTANCE_NAME @@ -49,7 +49,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=secret_key --value=$key +ynh_app_setting_set --app=$app --key=key --value=$key #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 0577d3c..d91fcf3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,7 +26,7 @@ db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) admin=$(ynh_app_setting_get --app=$app --key=admin) port=$(ynh_app_setting_get --app=$app --key=port) -architecture=$(ynh_detect_arch) +architecture=$YNH_ARCH datadir=$(ynh_app_setting_get --app=$app --key=datadir) #=================================================