mirror of
https://github.com/YunoHost-Apps/element_ynh.git
synced 2024-09-03 18:36:08 +02:00
[autopatch] Automatic patch attempt for helpers 2.1
This commit is contained in:
parent
edb0ce6929
commit
bddcd0533d
5 changed files with 17 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
*~
|
*~
|
||||||
~.sw[op]
|
~.sw[op]
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.sw[op]
|
||||||
|
|
|
@ -18,7 +18,7 @@ code = "https://github.com/element-hq/element-web"
|
||||||
cpe = "cpe:2.3:a:matrix:element"
|
cpe = "cpe:2.3:a:matrix:element"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2.27"
|
yunohost = ">= 11.2.18"
|
||||||
helpers_version = "2.1"
|
helpers_version = "2.1"
|
||||||
architectures = "all"
|
architectures = "all"
|
||||||
multi_instance = true
|
multi_instance = true
|
||||||
|
@ -65,6 +65,7 @@ ram.runtime = "0M"
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
group = "www-data:r-x"
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
configure_element()
|
configure_element()
|
||||||
{
|
{
|
||||||
ynh_config_add --template="config.json" --destination="$install_dir/config.json"
|
ynh_config_add --template="config.json" --destination="$install_dir/config.json"
|
||||||
chmod -R u=rwX,g=rX,o= "$install_dir"
|
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R u=rwX,g=rX,o= "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@ ynh_script_progression "Restoring the app main directory..."
|
||||||
|
|
||||||
ynh_restore "$install_dir"
|
ynh_restore "$install_dir"
|
||||||
|
|
||||||
chown -R "$app":www-data "$install_dir"
|
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app":www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEM CONFIGURATIONS
|
# RESTORE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -8,46 +8,55 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression 'Ensuring downward compatibility...'
|
ynh_script_progression 'Ensuring downward compatibility...'
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=default_home_server --value='matrix.org'
|
||||||
if [ -z "${default_home_server:-}" ]; then
|
if [ -z "${default_home_server:-}" ]; then
|
||||||
default_home_server='matrix.org'
|
default_home_server='matrix.org'
|
||||||
ynh_app_setting_set --key=default_home_server --value=$default_home_server
|
ynh_app_setting_set --key=default_home_server --value=$default_home_server
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=disable_custom_urls --value=false
|
||||||
if [ -z "${disable_custom_urls:-}" ]; then
|
if [ -z "${disable_custom_urls:-}" ]; then
|
||||||
disable_custom_urls=false
|
disable_custom_urls=false
|
||||||
ynh_app_setting_set --key=disable_custom_urls --value=$disable_custom_urls
|
ynh_app_setting_set --key=disable_custom_urls --value=$disable_custom_urls
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=disable_guests --value=false
|
||||||
if [ -z "${disable_guests:-}" ]; then
|
if [ -z "${disable_guests:-}" ]; then
|
||||||
disable_guests=false
|
disable_guests=false
|
||||||
ynh_app_setting_set --key=disable_guests --value=$disable_guests
|
ynh_app_setting_set --key=disable_guests --value=$disable_guests
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=disable_3pid_login --value=false
|
||||||
if [ -z "${disable_3pid_login:-}" ]; then
|
if [ -z "${disable_3pid_login:-}" ]; then
|
||||||
disable_3pid_login=false
|
disable_3pid_login=false
|
||||||
ynh_app_setting_set --key=disable_3pid_login --value=$disable_3pid_login
|
ynh_app_setting_set --key=disable_3pid_login --value=$disable_3pid_login
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=default_country_code --value=false
|
||||||
if [ -z "${default_country_code:-}" ]; then
|
if [ -z "${default_country_code:-}" ]; then
|
||||||
default_country_code=false
|
default_country_code=false
|
||||||
ynh_app_setting_set --key=default_country_code --value=$default_country_code
|
ynh_app_setting_set --key=default_country_code --value=$default_country_code
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=brand_text --value=Element
|
||||||
if [ -z "${brand_text:-}" ]; then
|
if [ -z "${brand_text:-}" ]; then
|
||||||
brand_text=Element
|
brand_text=Element
|
||||||
ynh_app_setting_set --key=brand_text --value=$brand_text
|
ynh_app_setting_set --key=brand_text --value=$brand_text
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=default_federate --value=true
|
||||||
if [ -z "${default_federate:-}" ]; then
|
if [ -z "${default_federate:-}" ]; then
|
||||||
default_federate=true
|
default_federate=true
|
||||||
ynh_app_setting_set --key=default_federate --value=$default_federate
|
ynh_app_setting_set --key=default_federate --value=$default_federate
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=default_theme --value=light
|
||||||
if [ -z "${default_theme:-}" ]; then
|
if [ -z "${default_theme:-}" ]; then
|
||||||
default_theme=light
|
default_theme=light
|
||||||
ynh_app_setting_set --key=default_theme --value=$default_theme
|
ynh_app_setting_set --key=default_theme --value=$default_theme
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=show_labs_settings --value=false
|
||||||
if [ -z "${show_labs_settings:-}" ]; then
|
if [ -z "${show_labs_settings:-}" ]; then
|
||||||
show_labs_settings=false
|
show_labs_settings=false
|
||||||
ynh_app_setting_set --key=show_labs_settings --value=$show_labs_settings
|
ynh_app_setting_set --key=show_labs_settings --value=$show_labs_settings
|
||||||
|
@ -60,9 +69,8 @@ ynh_script_progression "Upgrading source files..."
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="config.json"
|
ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="config.json"
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||||
chown -R "$app":www-data "$install_dir"
|
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app":www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD A CONFIGURATION
|
# ADD A CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue