1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ethercalc_ynh.git synced 2024-09-03 18:26:36 +02:00

Merge pull request #29 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2023-04-03 09:09:10 +02:00 committed by GitHub
commit 1ce5f4dfd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 84 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
EtherCalc is a collaborative spreadsheet that can be edited in real time. Each spreadsheet has its own URL. It has the basic functionalities: formatting, mathematical functions, graphics, adding comments, version history, export in HTML or in CSV. EtherCalc is a decentralized software: different instances allow the use of the service, they are made available by several organizations (for example the eponymous site or the FramaCalc service). This makes it possible to avoid concentrating all the data in the hands of the same actor. Instances can be personalized (limitation of the duration of hosting of the spreadsheet, modification of the design, etc.).
**Shipped version:** 20201228~ynh6
**Shipped version:** 20201228~ynh7
**Demo:** https://ethercalc.net/

View file

@ -19,7 +19,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
EtherCalc est un tableur collaboratif éditable en temps réel. Chaque tableur possède sa propre URL. Il dispose des fonctionnalités de base : mise en forme, fonctions mathématiques, graphiques, ajout de commentaires, historique des versions, export en HTML ou en CSV. EtherCalc est un logiciel décentralisé : différentes instances permettent d'utiliser le service, elles sont mises à disposition par plusieurs organisations (par exemple le site éponyme ou le service FramaCalc). Cela permet d'éviter de concentrer toutes les données entre les mains d'un même acteur. Les instances peuvent être personnalisées (limitation de la durée d'hébergement du tableur, modification du design, etc.).
**Version incluse :** 20201228~ynh6
**Version incluse :** 20201228~ynh7
**Démo :** https://ethercalc.net/

View file

@ -5,7 +5,7 @@ name = "EtherCalc"
description.en = "Real-time collaborative spreadsheet editor"
description.fr = "Feuille de calcul collaborative en ligne"
version = "20201228~ynh6"
version = "20201228~ynh7"
maintainers = ["ljf"]
@ -16,7 +16,7 @@ demo = "https://ethercalc.net/"
code = "https://github.com/audreyt/ethercalc"
[integration]
yunohost = ">= 11.1.15"
yunohost = ">= 11.1.16"
architectures = "all"
multi_instance = true
ldap = false
@ -44,6 +44,8 @@ ram.runtime = "50M"
[resources.sources.main]
url = "https://github.com/audreyt/ethercalc/archive/b196277081d677be991d104e454a52d242ef0189.tar.gz"
sha256 = "eaf1b7def67ebf1160d93e403a3930381e99a60f4768809bab653d1c9af26936"
autoupdate.upstream = "https://github.com/audreyt/ethercalc"
autoupdate.strategy = "latest_github_commit"
[resources.ports]

View file

@ -30,13 +30,18 @@ chown -R $app:www-data "$install_dir"
chmod +x $install_dir/bin/runSafe.sh
#=================================================
# NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
env_path="$PATH"
ynh_add_systemd_config
yunohost service add $app --description "Collaborative spreadsheet editor" --log="/var/log/$app/$app.log"
#=================================================
# INSTALL ETHERCALC
#=================================================
@ -48,21 +53,6 @@ pushd "$install_dir"
ynh_exec_warn_less npm i zappajs
popd
#=================================================
# SETUP SYSTEMD BASED SERVICES
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
env_path="$PATH"
ynh_add_systemd_config
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description "Collaborative spreadsheet editor" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================

View file

@ -10,10 +10,11 @@ source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD REMOVE
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
# REMOVE SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
@ -22,27 +23,12 @@ then
yunohost service remove $app
fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
#REMOVEME? ynh_script_progression --message="Removing dependencies..." --weight=2
# Remove metapackage and its dependencies
ynh_remove_nodejs
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config

View file

@ -9,14 +9,6 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -39,18 +31,17 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# RESTORE SYSTEMD
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description "Collaborative spreadsheet editor" --log="/var/log/$app/$app.log"
#=================================================
@ -60,13 +51,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -41,20 +41,23 @@ chown -R $app:www-data "$install_dir"
chmod +x $install_dir/bin/runSafe.sh
#=================================================
# NGINX CONFIGURATION
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
# Create a dedicated nginx config
ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=6
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
yunohost service add $app --description "Collaborative spreadsheet editor" --log="/var/log/$app/$app.log"
#=================================================
# INSTALL ETHERCALC
@ -67,22 +70,6 @@ pushd "$install_dir"
ynh_exec_warn_less npm i zappajs
popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
yunohost service add $app --description "Collaborative spreadsheet editor" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================