From 87d74410aaa438782d9ddd1aa8b6a4fd6ffd44a6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 20 Oct 2020 23:45:55 +0200 Subject: [PATCH] fix --- README.md | 37 +++++++++++++++++++++++++++++++++---- scripts/_common.sh | 37 ------------------------------------- scripts/remove | 37 ++++++++++++++++++++++++++++++------- scripts/upgrade | 2 ++ 4 files changed, 65 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index ae01342..876e87a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,37 @@ -# Jappix package for YunoHost +# Jappix for YunoHost -[![Integration level](https://dash.yunohost.org/integration/jappix.svg)](https://dash.yunohost.org/appci/app/jappix) ![](https://ci-apps.yunohost.org/ci/badges/jappix.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jappix.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/jappix.svg)](https://dash.yunohost.org/appci/app/jappix) ![](https://ci-apps.yunohost.org/ci/badges/jappix.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jappix.maintain.svg) +[![Install Jappix with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jappix) -- **YunoHost**: https://yunohost.org/ -- **Shipped version:** 1.1.7 +> *This package allows you to install Jappix quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* +## Overview Jappix is a fully-featured XMPP web-client with an open social platform which enables you to host your communication platform wherever you want to. + +**Shipped version:** 1.1.7 + +#### Supported architectures + +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jappix%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jappix/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jappix%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jappix/) + +## Links + + * Report a bug: https://github.com/YunoHost-Apps/jappix_ynh/issues + * App website: Link to the official website of this app. + * Upstream app repository: https://github.com/jappix/jappix/ + * YunoHost website: https://yunohost.org/ + +--- + +## Developer info + +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/jappix_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/jappix_ynh/tree/testing --debug +or +sudo yunohost app upgrade jappix -u https://github.com/YunoHost-Apps/jappix_ynh/tree/testing --debug +``` diff --git a/scripts/_common.sh b/scripts/_common.sh index 6872e5f..f2c588c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -42,46 +42,9 @@ SETUP_SOURCE () { # Télécharge la source, décompresse et copie dans $final_pa fi } -#================================================= #================================================= # FUTUR YNH HELPERS #================================================= -# Importer ce fichier de fonction avant celui des helpers officiel -# Ainsi, les officiels prendront le pas sur ceux-ci le cas échéant -#================================================= - -# Manage a fail of the script -# -# Print a warning to inform that the script was failed -# Execute the ynh_clean_setup function if used in the app script -# -# usage of ynh_clean_setup function -# This function provide a way to clean some residual of installation that not managed by remove script. -# To use it, simply add in your script: -# ynh_clean_setup () { -# instructions... -# } -# This function is optionnal. -# -# Usage: ynh_exit_properly is used only by the helper ynh_check_error. -# You must not use it directly. -ynh_exit_properly () { - exit_code=$? - if [ "$exit_code" -eq 0 ]; then - exit 0 # Exit without error if the script ended correctly - fi - - trap '' EXIT # Ignore new exit signals - set +eu # Do not exit anymore if a command fail or if a variable is empty - - echo -e "!!\n $app's script has encountered an error. Its execution was cancelled.\n!!" >&2 - - if type -t ynh_clean_setup > /dev/null; then # Check if the function exist in the app script. - ynh_clean_setup # Call the function to do specific cleaning for the app. - fi - - ynh_die # Exit with error status -} # Exit if an error occurs during the execution of the script. # diff --git a/scripts/remove b/scripts/remove index 2ef80cf..acb2152 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,18 +1,41 @@ #!/bin/bash -set -u +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh source /usr/share/yunohost/helpers -ynh_abort_if_errors +#================================================= +# LOAD SETTINGS +#================================================= +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME # Retrieve arguments domain=$(ynh_app_setting_get "$app" domain) -# Remove sources and configuration -sudo rm -rf "/var/www/${app}" -sudo rm -f "/etc/nginx/conf.d/${domain}.d/${app}.conf" +#================================================= +# REMOVE APP MAIN DIR +#================================================= +ynh_script_progression --message="Removing app main directory..." --weight=1 + +# Remove sources and configuration +ynh_secure_remove --file="/var/www/${app}" + +#================================================= +# REMOVE NGINX CONFIGURATION +#================================================= + +ynh_secure_remove --file="/etc/nginx/conf.d/${domain}.d/${app}.conf" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Removal of $app completed" --time --last -# Reload services -sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade index e40c44f..40f8185 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,6 +9,8 @@ source _common.sh source /usr/share/yunohost/helpers +ynh_abort_if_errors + #================================================= # LOAD SETTINGS #=================================================