1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dispatch_ynh.git synced 2024-09-03 18:25:53 +02:00

Merge pull request #8 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-11-19 08:44:02 +01:00 committed by GitHub
commit 31b0a91e2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 36 deletions

View file

@ -1,5 +0,0 @@
SOURCE_URL=https://github.com/khlieng/dispatch/releases/download/v0.7/dispatch_0.7_linux_armv6.tar.gz
SOURCE_SUM=dad01b72d80857830175cd7c2f9c5a82f4e59a72edea558ed7869de6bded8d80
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false

View file

@ -1,10 +1,5 @@
location / {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT__/;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";

View file

@ -18,7 +18,7 @@
"name": "eric_G"
},
"requirements": {
"yunohost": ">= 4.2.4"
"yunohost": ">= 4.3.0"
},
"multi_instance": false,
"services": [

View file

@ -15,26 +15,3 @@
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
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 armv7)" ]; then
architecture="armv7"
elif [ -n "$(uname -m | grep armv6)" ]; then
architecture="armv6"
else
architecture="unknown"
fi
echo $architecture
}

View file

@ -23,7 +23,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC
architecture=$(ynh_detect_arch)
architecture=$YNH_ARCH
app=$YNH_APP_INSTANCE_NAME
@ -45,6 +45,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=architecture --value=$architecture
#=================================================
# STANDARD MODIFICATIONS

View file

@ -20,7 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)
architecture=$(ynh_detect_arch)
architecture=$(ynh_app_setting_get --app=$app --key=architecture)
#=================================================
# CHECK VERSION
@ -34,6 +34,12 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# If architecture doesn't exist, create it
if [ -z "$architecture" ]; then
architecture=$YNH_ARCH
architecture=$(ynh_app_setting_get --app=$app --key=architecture)
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all