1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jappix_ynh.git synced 2024-09-03 19:26:19 +02:00
This commit is contained in:
ericgaspar 2020-10-20 23:45:55 +02:00
parent a4cf0ae188
commit 87d74410aa
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 65 additions and 48 deletions

View file

@ -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
```

View file

@ -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.
#

View file

@ -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

View file

@ -9,6 +9,8 @@
source _common.sh
source /usr/share/yunohost/helpers
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================