mirror of
https://github.com/YunoHost-Apps/fluffychat_ynh.git
synced 2024-09-03 18:36:04 +02:00
cleaning
This commit is contained in:
parent
1e8870e44a
commit
3eede2c0ae
7 changed files with 9 additions and 33 deletions
|
@ -22,7 +22,7 @@ code = "https://github.com/krille-chan/fluffychat"
|
|||
fund = "https://ko-fi.com/krille"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2.18"
|
||||
yunohost = ">= 11.2.29"
|
||||
helpers_version = "2.1"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ ynh_config_change_url_nginx
|
|||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
|
||||
# remove potential trailing slash to avoid double slashes
|
||||
path_without_trailing_slash=${path%/}
|
||||
ynh_replace --match="<base href=".*">" --replace="<base href=\"$path_without_trailing_slash/\">" --file="$install_dir/index.html"
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#REMOVEME? ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
|
|
@ -13,14 +13,11 @@ default_matrix_server=${default_matrix_server#*://}
|
|||
default_matrix_server=${default_matrix_server%/}
|
||||
ynh_app_setting_set --key=default_matrix_server --value="$default_matrix_server"
|
||||
|
||||
#=================================================
|
||||
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression "Setting up source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
# remove potential trailing slash to avoid double slashes
|
||||
|
@ -30,13 +27,11 @@ ynh_replace --match="<base href=".*">" --replace="<base href=\"$path_without_tra
|
|||
# patching main.dart.js to replace the default matrix server
|
||||
ynh_replace --match="=\"matrix.org\"" --replace="=\"$default_matrix_server\"" --file="$install_dir/main.dart.js"
|
||||
|
||||
#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 "www-data:www-data" "$install_dir"
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression "Adding system configurations related to $app..."
|
||||
|
||||
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||||
ynh_config_add_nginx
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -11,7 +10,6 @@ ynh_script_progression "Restoring the app main directory..."
|
|||
|
||||
ynh_restore "$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 "www-data:www-data" "$install_dir"
|
||||
#=================================================
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
|
|
|
@ -4,35 +4,22 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
# if we update from a version prior to the config panel, create new setting
|
||||
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=default_matrix_server --value="matrix.org"
|
||||
if [ -z "${default_matrix_server:-}" ]; then
|
||||
default_matrix_server="matrix.org"
|
||||
ynh_app_setting_set --key=default_matrix_server --value="$default_matrix_server"
|
||||
fi
|
||||
ynh_app_setting_set_default --key=default_matrix_server --value="matrix.org"
|
||||
|
||||
#=================================================
|
||||
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
|
||||
if ynh_app_upstream_version_changed
|
||||
then
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
ynh_setup_source --dest_dir="$install_dir" --full_replace
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir" --full_replace
|
||||
# remove potential trailing slash to avoid double slashes
|
||||
path_without_trailing_slash=${path%/}
|
||||
ynh_replace --match="<base href=".*">" --replace="<base href=\"$path_without_trailing_slash/\">" --file="$install_dir/index.html"
|
||||
|
||||
# remove potential trailing slash to avoid double slashes
|
||||
path_without_trailing_slash=${path%/}
|
||||
ynh_replace --match="<base href=".*">" --replace="<base href=\"$path_without_trailing_slash/\">" --file="$install_dir/index.html"
|
||||
# patching main.dart.js to replace the default matrix server
|
||||
ynh_replace --match="=\"matrix.org\"" --replace="=\"$default_matrix_server\"" --file="$install_dir/main.dart.js"
|
||||
|
||||
# patching main.dart.js to replace the default matrix server
|
||||
ynh_replace --match="=\"matrix.org\"" --replace="=\"$default_matrix_server\"" --file="$install_dir/main.dart.js"
|
||||
fi
|
||||
|
||||
#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 "www-data:www-data" "$install_dir"
|
||||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue