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

Merge pull request #19 from YunoHost-Apps/testing

Add --Purge
This commit is contained in:
yalh76 2022-06-07 20:04:21 +02:00 committed by GitHub
commit 098937aadc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 25 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# ChuWiki for YunoHost # ChuWiki for YunoHost
[![Integration level](https://dash.yunohost.org/integration/chuwiki.svg)](https://dash.yunohost.org/appci/app/chuwiki) ![](https://ci-apps.yunohost.org/ci/badges/chuwiki.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/chuwiki.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/chuwiki.svg)](https://dash.yunohost.org/appci/app/chuwiki) ![Working status](https://ci-apps.yunohost.org/ci/badges/chuwiki.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/chuwiki.maintain.svg)
[![Install ChuWiki with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=chuwiki) [![Install ChuWiki with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=chuwiki)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
@ -23,7 +23,7 @@ A simple, fast and flexible wiki.
## Screenshots ## Screenshots
![](./doc/screenshots/screenshot.png) ![Screenshot of ChuWiki](./doc/screenshots/screenshot.png)
## Disclaimers / important information ## Disclaimers / important information
@ -33,22 +33,23 @@ How to configure this app: via the `/var/www/chuwiki/configuration.ini` file.
## Documentation and resources ## Documentation and resources
* Official app website: http://chuwiki.genezys.net/ * Official app website: <http://chuwiki.genezys.net/>
* Official user documentation: https://yunohost.org/apps * Official user documentation: <https://yunohost.org/apps>
* Official admin documentation: http://chuwiki.genezys.net/ * Official admin documentation: <http://chuwiki.genezys.net/>
* Upstream app code repository: https://github.com/genezys/chuwiki * Upstream app code repository: <https://github.com/genezys/chuwiki>
* YunoHost documentation for this app: https://yunohost.org/app_chuwiki * YunoHost documentation for this app: <https://yunohost.org/app_chuwiki>
* Report a bug: https://github.com/YunoHost-Apps/chuwiki_ynh/issues * Report a bug: <https://github.com/YunoHost-Apps/chuwiki_ynh/issues>
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing --debug
or or
sudo yunohost app upgrade chuwiki -u https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing --debug sudo yunohost app upgrade chuwiki -u https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps **More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,10 +1,14 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# ChuWiki pour YunoHost # ChuWiki pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/chuwiki.svg)](https://dash.yunohost.org/appci/app/chuwiki) ![](https://ci-apps.yunohost.org/ci/badges/chuwiki.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/chuwiki.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/chuwiki.svg)](https://dash.yunohost.org/appci/app/chuwiki) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/chuwiki.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/chuwiki.maintain.svg)
[![Installer ChuWiki avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=chuwiki) [![Installer ChuWiki avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=chuwiki)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer ChuWiki rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet d'installer ChuWiki rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
@ -19,7 +23,7 @@ Un wiki simple, rapide et flexible.
## Captures d'écran ## Captures d'écran
![](./doc/screenshots/screenshot.png) ![Capture d'écran de ChuWiki](./doc/screenshots/screenshot.png)
## Avertissements / informations importantes ## Avertissements / informations importantes
@ -29,22 +33,23 @@ Comment configurer cette application : via le fichier `/var/www/chuwiki/configur
## Documentations et ressources ## Documentations et ressources
* Site officiel de l'app : http://chuwiki.genezys.net/ * Site officiel de l'app : <http://chuwiki.genezys.net/>
* Documentation officielle utilisateur : https://yunohost.org/apps * Documentation officielle utilisateur : <https://yunohost.org/apps>
* Documentation officielle de l'admin : http://chuwiki.genezys.net/ * Documentation officielle de l'admin : <http://chuwiki.genezys.net/>
* Dépôt de code officiel de l'app : https://github.com/genezys/chuwiki * Dépôt de code officiel de l'app : <https://github.com/genezys/chuwiki>
* Documentation YunoHost pour cette app : https://yunohost.org/app_chuwiki * Documentation YunoHost pour cette app : <https://yunohost.org/app_chuwiki>
* Signaler un bug : https://github.com/YunoHost-Apps/chuwiki_ynh/issues * Signaler un bug : <https://github.com/YunoHost-Apps/chuwiki_ynh/issues>
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit. Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade chuwiki -u https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing --debug sudo yunohost app upgrade chuwiki -u https://github.com/YunoHost-Apps/chuwiki_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps **Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -34,8 +34,7 @@
"install" : [ "install" : [
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain"
"example": "example.com"
}, },
{ {
"name": "path", "name": "path",

View file

@ -29,6 +29,16 @@ ynh_secure_remove --file="$final_path"
# Remove the content directory securely # Remove the content directory securely
#ynh_secure_remove --file="/home/yunohost.app/$app" #ynh_secure_remove --file="/home/yunohost.app/$app"
#=================================================
# REMOVE DATA DIR
#=================================================
# Remove the data directory if --purge option is used
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
then
ynh_script_progression --message="Removing app data directory..." --time --weight=1
ynh_secure_remove --file="$datadir"
fi
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION

View file

@ -35,8 +35,6 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." --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}"
test ! -d $final_path \ test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path " || ynh_die --message="There is already a directory: $final_path "