From 3eede2c0aec4c0fc7beb61719bde6185c2f1135a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Sun, 1 Sep 2024 18:04:55 +0200
Subject: [PATCH] cleaning
---
manifest.toml | 2 +-
scripts/backup | 1 -
scripts/change_url | 1 -
scripts/config | 2 --
scripts/install | 5 -----
scripts/restore | 2 --
scripts/upgrade | 29 ++++++++---------------------
7 files changed, 9 insertions(+), 33 deletions(-)
diff --git a/manifest.toml b/manifest.toml
index 10a8efe..bd7c0f0 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -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
diff --git a/scripts/backup b/scripts/backup
index af443d9..5d6d43d 100755
--- a/scripts/backup
+++ b/scripts/backup
@@ -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
diff --git a/scripts/change_url b/scripts/change_url
index f78cea0..fcaacb6 100644
--- a/scripts/change_url
+++ b/scripts/change_url
@@ -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="" --replace="" --file="$install_dir/index.html"
diff --git a/scripts/config b/scripts/config
index 0d81cba..4f7153c 100644
--- a/scripts/config
+++ b/scripts/config
@@ -6,8 +6,6 @@
source /usr/share/yunohost/helpers
-#REMOVEME? ynh_abort_if_errors
-
#=================================================
# RETRIEVE ARGUMENTS
#=================================================
diff --git a/scripts/install b/scripts/install
index 7f9e3a1..65d5d40 100755
--- a/scripts/install
+++ b/scripts/install
@@ -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="" --replace="" --replace="" --file="$install_dir/index.html"
- # remove potential trailing slash to avoid double slashes
- path_without_trailing_slash=${path%/}
- ynh_replace --match="" --replace="" --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
#=================================================