diff --git a/.gitignore b/.gitignore
index d40f605..05a9d0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
-!dist/*~
-*.sw[op]
-.DS_Store
+!dist/
\ No newline at end of file
diff --git a/ALL_README.md b/ALL_README.md
index e3c80d2..152f2e7 100644
--- a/ALL_README.md
+++ b/ALL_README.md
@@ -5,6 +5,4 @@
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
-- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
-- [Прочитать README на русский](README_ru.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)
diff --git a/README.md b/README.md
index f75fb26..9077f70 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Strut for YunoHost
-[](https://ci-apps.yunohost.org/ci/apps/strut/)  
+[](https://dash.yunohost.org/appci/app/strut)  
[](https://install-app.yunohost.org/?app=strut)
@@ -18,7 +18,7 @@ It shall NOT be edited by hand.
Strut is a simple, online editor that doesn't even require registration to operate. Everything you do is recoverable and re-usable.
-**Shipped version:** 20231204~ynh2
+**Shipped version:** 20231204~ynh1
**Demo:**
diff --git a/README_es.md b/README_es.md
index d7c44ea..a1fe1af 100644
--- a/README_es.md
+++ b/README_es.md
@@ -5,7 +5,7 @@ No se debe editar a mano.
# Strut para Yunohost
-[](https://ci-apps.yunohost.org/ci/apps/strut/)  
+[](https://dash.yunohost.org/appci/app/strut)  
[](https://install-app.yunohost.org/?app=strut)
@@ -18,7 +18,7 @@ No se debe editar a mano.
Strut is a simple, online editor that doesn't even require registration to operate. Everything you do is recoverable and re-usable.
-**Versión actual:** 20231204~ynh2
+**Versión actual:** 20231204~ynh1
**Demo:**
diff --git a/README_eu.md b/README_eu.md
index 5355941..d43cdf4 100644
--- a/README_eu.md
+++ b/README_eu.md
@@ -5,7 +5,7 @@ EZ editatu eskuz.
# Strut YunoHost-erako
-[](https://ci-apps.yunohost.org/ci/apps/strut/)  
+[](https://dash.yunohost.org/appci/app/strut)  
[](https://install-app.yunohost.org/?app=strut)
@@ -18,7 +18,7 @@ EZ editatu eskuz.
Strut is a simple, online editor that doesn't even require registration to operate. Everything you do is recoverable and re-usable.
-**Paketatutako bertsioa:** 20231204~ynh2
+**Paketatutako bertsioa:** 20231204~ynh1
**Demoa:**
diff --git a/README_fr.md b/README_fr.md
index f2a2f82..70a1660 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# Strut pour YunoHost
-[](https://ci-apps.yunohost.org/ci/apps/strut/)  
+[](https://dash.yunohost.org/appci/app/strut)  
[](https://install-app.yunohost.org/?app=strut)
@@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
Strut est un éditeur WEB de présentations fonctionnant en HTML/JS. Tout se passe en local.
-**Version incluse :** 20231204~ynh2
+**Version incluse :** 20231204~ynh1
**Démo :**
diff --git a/README_gl.md b/README_gl.md
index e25c2b9..cd9a42c 100644
--- a/README_gl.md
+++ b/README_gl.md
@@ -5,7 +5,7 @@ NON debe editarse manualmente.
# Strut para YunoHost
-[](https://ci-apps.yunohost.org/ci/apps/strut/)  
+[](https://dash.yunohost.org/appci/app/strut)  
[](https://install-app.yunohost.org/?app=strut)
@@ -18,7 +18,7 @@ NON debe editarse manualmente.
Strut is a simple, online editor that doesn't even require registration to operate. Everything you do is recoverable and re-usable.
-**Versión proporcionada:** 20231204~ynh2
+**Versión proporcionada:** 20231204~ynh1
**Demo:**
diff --git a/README_id.md b/README_id.md
deleted file mode 100644
index f3e8e89..0000000
--- a/README_id.md
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-# Strut untuk YunoHost
-
-[](https://ci-apps.yunohost.org/ci/apps/strut/)  
-
-[](https://install-app.yunohost.org/?app=strut)
-
-*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
-
-> *Paket ini memperbolehkan Anda untuk memasang Strut secara cepat dan mudah pada server YunoHost.*
-> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
-
-## Ringkasan
-
-Strut is a simple, online editor that doesn't even require registration to operate. Everything you do is recoverable and re-usable.
-
-**Versi terkirim:** 20231204~ynh2
-
-**Demo:**
-
-## Tangkapan Layar
-
-
-
-## :red_circle: Antifitur
-
-- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc.
-
-## Dokumentasi dan sumber daya
-
-- Website aplikasi resmi:
-- Depot kode aplikasi hulu:
-- Gudang YunoHost:
-- Laporkan bug:
-
-## Info developer
-
-Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/strut_ynh/tree/testing).
-
-Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
-
-```bash
-sudo yunohost app install https://github.com/YunoHost-Apps/strut_ynh/tree/testing --debug
-atau
-sudo yunohost app upgrade strut -u https://github.com/YunoHost-Apps/strut_ynh/tree/testing --debug
-```
-
-**Info lebih lanjut mengenai pemaketan aplikasi:**
diff --git a/README_ru.md b/README_ru.md
deleted file mode 100644
index d0b24cc..0000000
--- a/README_ru.md
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-# Strut для YunoHost
-
-[](https://ci-apps.yunohost.org/ci/apps/strut/)  
-
-[](https://install-app.yunohost.org/?app=strut)
-
-*[Прочтите этот README на других языках.](./ALL_README.md)*
-
-> *Этот пакет позволяет Вам установить Strut быстро и просто на YunoHost-сервер.*
-> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
-
-## Обзор
-
-Strut is a simple, online editor that doesn't even require registration to operate. Everything you do is recoverable and re-usable.
-
-**Поставляемая версия:** 20231204~ynh2
-
-**Демо-версия:**
-
-## Снимки экрана
-
-
-
-## :red_circle: Анти-функции
-
-- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc.
-
-## Документация и ресурсы
-
-- Официальный веб-сайт приложения:
-- Репозиторий кода главной ветки приложения:
-- Магазин YunoHost:
-- Сообщите об ошибке:
-
-## Информация для разработчиков
-
-Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/strut_ynh/tree/testing).
-
-Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
-
-```bash
-sudo yunohost app install https://github.com/YunoHost-Apps/strut_ynh/tree/testing --debug
-или
-sudo yunohost app upgrade strut -u https://github.com/YunoHost-Apps/strut_ynh/tree/testing --debug
-```
-
-**Больше информации о пакетировании приложений:**
diff --git a/README_zh_Hans.md b/README_zh_Hans.md
index 7e8ed21..b1de7ff 100644
--- a/README_zh_Hans.md
+++ b/README_zh_Hans.md
@@ -5,7 +5,7 @@
# YunoHost 上的 Strut
-[](https://ci-apps.yunohost.org/ci/apps/strut/)  
+[](https://dash.yunohost.org/appci/app/strut)  
[](https://install-app.yunohost.org/?app=strut)
@@ -18,7 +18,7 @@
Strut is a simple, online editor that doesn't even require registration to operate. Everything you do is recoverable and re-usable.
-**分发版本:** 20231204~ynh2
+**分发版本:** 20231204~ynh1
**演示:**
diff --git a/manifest.toml b/manifest.toml
index 602b3ec..338ccfc 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -5,7 +5,7 @@ name = "Strut"
description.en = "Slide editor for creating impress.js presentations"
description.fr = "Éditeur de diapositives permettant de créer des présentations impress.js"
-version = "20231204~ynh2"
+version = "20231204~ynh1"
maintainers = ["ljf"]
@@ -16,8 +16,7 @@ demo = "http://strut.io/dist/"
code = "https://github.com/MohannadNaj/Strut"
[integration]
-yunohost = ">= 11.2.29"
-helpers_version = "2.1"
+yunohost = ">= 11.2"
architectures = "all"
multi_instance = true
@@ -50,7 +49,6 @@ ram.runtime = "50M"
[resources.system_user]
[resources.install_dir]
- group = "www-data:r-x"
[resources.permissions]
main.url = "/"
diff --git a/scripts/_common.sh b/scripts/_common.sh
index 3d7f008..69c72c9 100644
--- a/scripts/_common.sh
+++ b/scripts/_common.sh
@@ -1,5 +1,17 @@
#!/bin/bash
#=================================================
-# COMMON VARIABLES AND CUSTOM HELPERS
+# COMMON VARIABLES
#=================================================
+
+#=================================================
+# PERSONAL HELPERS
+#=================================================
+
+#=================================================
+# EXPERIMENTAL HELPERS
+#=================================================
+
+#=================================================
+# FUTURE OFFICIAL HELPERS
+#=================================================
\ No newline at end of file
diff --git a/scripts/backup b/scripts/backup
index 5d6d43d..55ccde2 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -1,24 +1,33 @@
#!/bin/bash
-source ../settings/scripts/_common.sh
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+# source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
-ynh_print_info "Declaring files to be backed up..."
+#=================================================
+# DECLARE DATA AND CONF FILES TO BACKUP
+#=================================================
+ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
-ynh_backup "$install_dir"
+ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
-ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
+ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# END OF SCRIPT
#=================================================
-ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
+ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
diff --git a/scripts/change_url b/scripts/change_url
index c73b7a4..8a06216 100644
--- a/scripts/change_url
+++ b/scripts/change_url
@@ -1,17 +1,25 @@
#!/bin/bash
+#=================================================
+# GENERIC STARTING
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
# source _common.sh
source /usr/share/yunohost/helpers
+#=================================================
+# STANDARD MODIFICATIONS
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
-ynh_script_progression "Updating NGINX web server configuration..."
+ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
-ynh_config_change_url_nginx
+ynh_change_url_nginx_config
#=================================================
# END OF SCRIPT
#=================================================
-ynh_script_progression "Change of URL completed for $app"
+ynh_script_progression --message="Change of URL completed for $app" --last
diff --git a/scripts/install b/scripts/install
index b2db7a0..c5c2aed 100644
--- a/scripts/install
+++ b/scripts/install
@@ -1,38 +1,52 @@
#!/bin/bash
-source _common.sh
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+# source _common.sh
source /usr/share/yunohost/helpers
+#=================================================
+# STANDARD MODIFICATIONS
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
-ynh_script_progression "Setting up source files..."
+ynh_script_progression --message="Setting up source files..." --weight=4
tmp_dir=$(mktemp -d)
ynh_setup_source --dest_dir="$tmp_dir"
# Dist is the compiled version. Other directories are source code and tools to build the program
cp -a "$tmp_dir/dist/." "$install_dir/"
-ynh_safe_rm "$tmp_dir"
+ynh_secure_remove --file="$tmp_dir"
+# Set permissions on app files
+chown -R $app:www-data "$install_dir"
+chmod -R 640 "$install_dir"
find "$install_dir" -type d -print0 | xargs -0 chmod 750
#=================================================
# NGINX CONFIGURATION
#=================================================
-ynh_script_progression "Configuring NGINX web server..."
+ynh_script_progression --message="Configuring NGINX web server..." --weight=4
-ynh_config_add_nginx
+# Create a dedicated NGINX config
+ynh_add_nginx_config
+#=================================================
+# SPECIFIC SETUP
#=================================================
# PATCH SOURCE
#=================================================
# Imgur is deactivated on the specific upstream selected, but this text is still here
# Don't use a patch because it's minified js
-ynh_replace --match="are currently uploaded to imgur.*re working on changing this" --replace="size is limited" --file="$install_dir/scripts/amd-app.js"
+ynh_replace_string --match_string="are currently uploaded to imgur.*re working on changing this" --replace_string="size is limited" --target_file="$install_dir/scripts/amd-app.js"
#=================================================
# END OF SCRIPT
#=================================================
-ynh_script_progression "Installation of $app completed"
+ynh_script_progression --message="Installation of $app completed" --last
diff --git a/scripts/remove b/scripts/remove
index b3575da..318dae4 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -1,16 +1,24 @@
#!/bin/bash
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+# source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
-ynh_script_progression "Removing NGINX web server configuration..."
+ynh_script_progression --message="Removing NGINX web server configuration..."
-ynh_config_remove_nginx
+# Remove the dedicated NGINX config
+ynh_remove_nginx_config
#=================================================
# END OF SCRIPT
#=================================================
-ynh_script_progression "Removal of $app completed"
+ynh_script_progression --message="Removal of $app completed" --last
diff --git a/scripts/restore b/scripts/restore
index dd121ad..d7ea54b 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -1,37 +1,50 @@
#!/bin/bash
-source ../settings/scripts/_common.sh
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
+# source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
+#=================================================
+# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
-ynh_script_progression "Restoring the NGINX web server configuration..."
+ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
-ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
+ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
-ynh_script_progression "Restoring the app main directory..."
+ynh_script_progression --message="Restoring the app main directory..." --weight=1
-ynh_restore "$install_dir"
+ynh_restore_file --origin_path="$install_dir"
#=================================================
# RESTORE USER RIGHTS
#=================================================
+# Restore permissions on app files
+chown -R $app:www-data "$install_dir"
+chmod -R 640 "$install_dir"
find "$install_dir" -type d -print0 | xargs -0 chmod 750
+#=================================================
+# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX
#=================================================
-ynh_script_progression "Reloading NGINX web server..."
+ynh_script_progression --message="Reloading NGINX web server..." --weight=1
-ynh_systemctl --service=nginx --action=reload
+ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
-ynh_script_progression "Restoration completed for $app"
+ynh_script_progression --message="Restoration completed for $app" --last
diff --git a/scripts/upgrade b/scripts/upgrade
index 800dac4..ccb2987 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -1,42 +1,74 @@
#!/bin/bash
+#=================================================
+# GENERIC START
+#=================================================
+# IMPORT GENERIC HELPERS
+#=================================================
+
# source _common.sh
source /usr/share/yunohost/helpers
+#=================================================
+# CHECK VERSION
+#=================================================
+
+upgrade_type=$(ynh_check_app_version_changed)
+
+#=================================================
+# STANDARD UPGRADE STEPS
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
-ynh_script_progression "Upgrading source files..."
-tmp_dir=$(mktemp -d)
+if [ "$upgrade_type" == "UPGRADE_APP" ]
+then
+ ynh_script_progression --message="Upgrading source files..." --weight=4
-ynh_setup_source --dest_dir="$tmp_dir"
+ # Download, check integrity, uncompress and patch the source from app.src
+ # For this app sources are in app subdirectory
+ tmp_dir=$(mktemp -d)
-cp -a "$tmp_dir/dist/." "$install_dir/"
-ynh_safe_rm "$tmp_dir"
+ ynh_setup_source --dest_dir="$tmp_dir"
+ # Dist is the compiled version. Other directories are source code and tools to build the program
+ cp -a "$tmp_dir/dist/." "$install_dir/"
+ ynh_secure_remove --file="$tmp_dir"
+fi
#=================================================
# NGINX CONFIGURATION
#=================================================
-ynh_script_progression "Upgrading NGINX web server configuration..."
+ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
-ynh_config_add_nginx
+# Create a dedicated nginx config
+ynh_add_nginx_config
+#=================================================
+# SPECIFIC UPGRADE
#=================================================
# PATCH SOURCE
#=================================================
-# Imgur is deactivated on the specific upstream selected, but this text is still here
-# Don't use a patch because it's minified js
-ynh_replace --match="are currently uploaded to imgur.*re working on changing this" --replace="size is limited" --file="$install_dir/scripts/amd-app.js"
+if [ "$upgrade_type" == "UPGRADE_APP" ]
+then
+ # Imgur is deactivated on the specific upstream selected, but this text is still here
+ # Don't use a patch because it's minified js
+ ynh_replace_string --match_string="are currently uploaded to imgur.*re working on changing this" --replace_string="size is limited" --target_file="$install_dir/scripts/amd-app.js"
+fi
+
+#=================================================
+# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
+# Set permissions on app files
+chown -R $app:www-data "$install_dir"
+chmod -R 640 "$install_dir"
find "$install_dir" -type d -print0 | xargs -0 chmod 750
#=================================================
# END OF SCRIPT
#=================================================
-ynh_script_progression "Upgrade of $app completed"
+ynh_script_progression --message="Upgrade of $app completed" --last
diff --git a/sources/patches/app-00-remove-google.patch b/sources/patches/app-00-remove-google.patch
new file mode 100644
index 0000000..de2f090
--- /dev/null
+++ b/sources/patches/app-00-remove-google.patch
@@ -0,0 +1,25 @@
+--- a/dist/index.html
++++ b/dist/index.html
+@@ -15,15 +15,6 @@
+
+
+
+-
+
+
+