1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my-mind_ynh.git synced 2024-09-03 19:46:22 +02:00

Cleaning up

This commit is contained in:
ericgaspar 2020-10-12 09:09:15 +02:00
parent a987a7d88b
commit 8d2f68d881
No known key found for this signature in database
GPG key ID: 574F281483054D44
8 changed files with 58 additions and 52 deletions

View file

@ -1,14 +1,14 @@
# My-Mind for YunoHost
[![Integration level](https://dash.yunohost.org/integration/my-mind.svg)](https://dash.yunohost.org/appci/app/my-mind) ![](https://ci-apps.yunohost.org/ci/badges/my-mind.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/my-mind.maintain.svg)
[![Install My-Mind with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=my-mind)
[![Install My Mind with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=my-mind)
> *This package allow you to install My-Mind quickly and simply on a YunoHost server.
> *This package allow you to install My Mind quickly and simply on a YunoHost server.
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
## Overview
My-Mind is a web application for creating and managing Mind maps. It is free to use and you can fork its source code. It is distributed under the terms of the MIT license.
New to Mind maps? They are useful, aesthetic and cool! Read more about these special diagrams in [the Wikipedia article](http://en.wikipedia.org/wiki/Mind_map).
My Mind is a web application for creating and managing Mind maps. It is free to use and you can fork its source code. It is distributed under the terms of the MIT license.
New to mind maps? They are useful, aesthetic and cool! Read more about these special diagrams in [the Wikipedia article](http://en.wikipedia.org/wiki/Mind_map).
**Shipped version:** 1.2
@ -20,10 +20,6 @@ New to Mind maps? They are useful, aesthetic and cool! Read more about these spe
* [Official demo](http://my-mind.github.io/?map=examples/features.mymind)
## Configuration
How to configure this app: From an admin panel, a plain file with SSH, or any other way.
## Documentation
* Official documentation: https://github.com/ondras/my-mind/wiki
@ -38,7 +34,7 @@ How to configure this app: From an admin panel, a plain file with SSH, or any ot
#### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/my-mind%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/my-mind/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/my-mind%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/my-mind/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/my-mind%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/my-mind/)
## Limitations
@ -56,3 +52,15 @@ How to configure this app: From an admin panel, a plain file with SSH, or any ot
* Upstream app repository: https://github.com/ondras/my-mind
* YunoHost website: https://yunohost.org/
---
## Developers infos
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/my-mind_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
sudo yunohost app install https://github.com/YunoHost-Apps/my-mind_ynh/tree/testing --debug
or
sudo yunohost app upgrade my-mind -u https://github.com/YunoHost-Apps/my-mind_ynh/tree/testing --debug
```

View file

@ -1,5 +1,5 @@
{
"name": "My-Mind",
"name": "My Mind",
"id": "my-mind",
"packaging_format": 1,
"description": {
@ -28,8 +28,8 @@
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for My-Mind",
"fr": "Choisissez un nom de domaine pour My-Mind"
"en": "Choose a domain name for My Mind",
"fr": "Choisissez un nom de domaine pour My Mind"
},
"example": "example.com"
},
@ -37,8 +37,8 @@
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for My-Mind",
"fr": "Choisissez un chemin pour My-Mind"
"en": "Choose a path for My Mind",
"fr": "Choisissez un chemin pour My Mind"
},
"example": "/example",
"default": "/mymind"

View file

@ -53,4 +53,4 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
ynh_print_info --message="Backup script completed for My Mind. (YunoHost will then actually copy those files to the archive)."

View file

@ -32,7 +32,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its URL(may take a while)..." --weight=1
ynh_script_progression --message="Backing up My Mind before changing its URL..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
@ -67,7 +67,7 @@ fi
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=3
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
@ -98,7 +98,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
@ -106,4 +106,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last
ynh_script_progression --message="Change of URL completed for My Mind" --last

View file

@ -28,7 +28,7 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
ynh_script_progression --message="Validating installation parameters..." --time --weight=1
ynh_script_progression --message="Validating installation parameters..." --weight=1
final_path=/var/www/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
@ -39,7 +39,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
ynh_script_progression --message="Storing installation settings..." --time --weight=1
ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
@ -48,7 +48,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --time --weight=1
ynh_script_progression --message="Setting up source files..." --weight=1
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
@ -57,7 +57,7 @@ ynh_setup_source --dest_dir="$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --time --weight=1
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated nginx config
ynh_add_nginx_config
@ -65,7 +65,7 @@ ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --time --weight=1
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app
@ -73,7 +73,7 @@ ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --time --weight=1
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated php-fpm config
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION
@ -89,7 +89,7 @@ chown -R $app: $final_path
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..." --time --weight=1
ynh_script_progression --message="Configuring SSOwat..." --weight=2
# Make app public if necessary or protect it
if [ $is_public -eq 1 ]
@ -100,7 +100,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..." --weight=1
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
@ -108,4 +108,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --last
ynh_script_progression --message="Installation of My Mindcompleted" --last

View file

@ -22,7 +22,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Removing app main directory..." --weight=1
ynh_script_progression --message="Removing My Mind main directory..." --weight=2
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
@ -30,7 +30,7 @@ ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing nginx web server configuration..." --time --weight=1
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
# Remove the dedicated nginx config
ynh_remove_nginx_config
@ -38,7 +38,7 @@ ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing php-fpm configuration..." --time --weight=1
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
# Remove the dedicated php-fpm config
ynh_remove_fpm_config
@ -48,7 +48,7 @@ ynh_remove_fpm_config
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Removing the dedicated system user..." --time --weight=1
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
# Delete a system user
ynh_system_user_delete --username=$app
@ -57,4 +57,4 @@ ynh_system_user_delete --username=$app
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last
ynh_script_progression --message="Removal of My Mind completed" --last

View file

@ -19,7 +19,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading settings..." --time --weight=1
ynh_script_progression --message="Loading settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
@ -31,7 +31,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --time --weight=1
ynh_script_progression --message="Validating restoration parameters..." --weight=1
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
@ -49,14 +49,14 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --time --weight=1
ynh_script_progression --message="Restoring My Mind main directory..." --weight=3
ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --time --weight=1
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
@ -72,14 +72,14 @@ chown -R $app: $final_path
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading nginx web server and php-fpm..." --time --weight=1
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload
@ -88,4 +88,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --time --last
ynh_script_progression --message="Restoration completed for My Mind" --last

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1
ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
@ -25,7 +25,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
@ -45,7 +45,7 @@ fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --time --weight=1
ynh_script_progression --message="Backing up My Mind before upgrading (may take a while)..." --weight=3
# Backup the current version of the app
ynh_backup_before_upgrade
@ -62,15 +62,13 @@ ynh_abort_if_errors
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated nginx config
ynh_add_nginx_config
@ -78,7 +76,7 @@ ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
@ -86,7 +84,7 @@ ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading php-fpm configuration..." --time --weight=1
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated php-fpm config
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION
@ -101,7 +99,7 @@ chown -R $app: $final_path
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..." --time --weight=1
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
@ -109,4 +107,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last
ynh_script_progression --message="Upgrade of My Mind completed" --last