mirror of
https://github.com/YunoHost-Apps/pepettes_ynh.git
synced 2024-09-03 19:56:35 +02:00
commit
0053e9dbbc
4 changed files with 53 additions and 25 deletions
18
README.md
18
README.md
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
# Pepettes for YunoHost
|
# Pepettes for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/pepettes)  
|
[](https://dash.yunohost.org/appci/app/pepettes)  
|
||||||
[](https://install-app.yunohost.org/?app=pepettes)
|
[](https://install-app.yunohost.org/?app=pepettes)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
@ -17,30 +17,30 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
A simple donation form with stripe
|
A simple donation form with stripe
|
||||||
|
|
||||||
**Shipped version:** 1.0.1~ynh2
|
**Shipped version:** 1.0.1~ynh3
|
||||||
|
|
||||||
**Demo:** https://donate.yunohost.org
|
**Demo:** https://donate.yunohost.org
|
||||||
|
|
||||||
## Disclaimers / important information
|
## Disclaimers / important information
|
||||||
|
|
||||||
This app may be configured through the `settings.py` after installation.
|
This app may be configured through the `settings.py` after installation.
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official admin documentation: https://github.com/YunoHost/pepettes/blob/main/README.md
|
* Official admin documentation: <https://github.com/YunoHost/pepettes/blob/main/README.md>
|
||||||
* Upstream app code repository: https://github.com/YunoHost/pepettes/
|
* Upstream app code repository: <https://github.com/YunoHost/pepettes/>
|
||||||
* YunoHost documentation for this app: https://yunohost.org/app_pepettes
|
* YunoHost documentation for this app: <https://yunohost.org/app_pepettes>
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/pepettes_ynh/issues
|
* Report a bug: <https://github.com/YunoHost-Apps/pepettes_ynh/issues>
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
||||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing).
|
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/pepettes_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/pepettes_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade pepettes -u https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug
|
sudo yunohost app upgrade pepettes -u https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
||||||
|
|
24
README_fr.md
24
README_fr.md
|
@ -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.
|
||||||
|
-->
|
||||||
|
|
||||||
# Pepettes pour YunoHost
|
# Pepettes pour YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/pepettes)  
|
[](https://dash.yunohost.org/appci/app/pepettes)  
|
||||||
[](https://install-app.yunohost.org/?app=pepettes)
|
[](https://install-app.yunohost.org/?app=pepettes)
|
||||||
|
|
||||||
*[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 Pepettes rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d'installer Pepettes 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.*
|
||||||
|
@ -13,30 +17,30 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Un simple formulaire de don avec stripe
|
Un simple formulaire de don avec stripe
|
||||||
|
|
||||||
**Version incluse :** 1.0.1~ynh2
|
**Version incluse :** 1.0.1~ynh3
|
||||||
|
|
||||||
**Démo :** https://donate.yunohost.org
|
**Démo :** https://donate.yunohost.org
|
||||||
|
|
||||||
## Avertissements / informations importantes
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
This app may be configured through the `settings.py` after installation.
|
This app may be configured through the `settings.py` after installation.
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Documentation officielle de l'admin : https://github.com/YunoHost/pepettes/blob/main/README.md
|
* Documentation officielle de l'admin : <https://github.com/YunoHost/pepettes/blob/main/README.md>
|
||||||
* Dépôt de code officiel de l'app : https://github.com/YunoHost/pepettes/
|
* Dépôt de code officiel de l'app : <https://github.com/YunoHost/pepettes/>
|
||||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_pepettes
|
* Documentation YunoHost pour cette app : <https://yunohost.org/app_pepettes>
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/pepettes_ynh/issues
|
* Signaler un bug : <https://github.com/YunoHost-Apps/pepettes_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/pepettes_ynh/tree/testing).
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/pepettes_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/pepettes_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug
|
||||||
ou
|
ou
|
||||||
sudo yunohost app upgrade pepettes -u https://github.com/YunoHost-Apps/pepettes_ynh/tree/testing --debug
|
sudo yunohost app upgrade pepettes -u https://github.com/YunoHost-Apps/pepettes_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>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "A simple donation form with stripe",
|
"en": "A simple donation form with stripe",
|
||||||
"fr": "Un simple formulaire de don avec stripe"
|
"fr": "Un simple formulaire de don avec stripe"
|
||||||
},
|
},
|
||||||
"version": "1.0.1~ynh2",
|
"version": "1.0.1~ynh3",
|
||||||
"url": "https://github.com/YunoHost/pepettes/",
|
"url": "https://github.com/YunoHost/pepettes/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -29,10 +29,17 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
# Needed for helper "ynh_add_nginx_config"
|
# Needed for helper "ynh_add_nginx_config"
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
# Add settings here as needed by your application
|
project_name=$(ynh_app_setting_get --app=$app --key=project_name)
|
||||||
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
contact_url=$(ynh_app_setting_get --app=$app --key=contact_url)
|
||||||
#db_user=$db_name
|
logo=$(ynh_app_setting_get --app=$app --key=logo)
|
||||||
#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
favicon=$(ynh_app_setting_get --app=$app --key=favicon)
|
||||||
|
publishable_key=$(ynh_app_setting_get --app=$app --key=publishable_key)
|
||||||
|
secret_key=$(ynh_app_setting_get --app=$app --key=secret_key)
|
||||||
|
prices=$(ynh_app_setting_get --app=$app --key=prices)
|
||||||
|
secret=$(ynh_app_setting_get --app=$app --key=secret)
|
||||||
|
csrf_key=$(ynh_app_setting_get --app=$app --key=csrf_key)
|
||||||
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
|
domain=$new_domain
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
|
@ -108,8 +115,25 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC MODIFICATIONS
|
# SPECIFIC MODIFICATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
# ...
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Updating a configuration file..."
|
||||||
|
|
||||||
|
ynh_add_config --template="../conf/gunicorn.py" --destination="$final_path/gunicorn.py"
|
||||||
|
ynh_add_config --template="../conf/settings.py" --destination="$final_path/settings.py"
|
||||||
|
|
||||||
|
for price in $(echo $prices | sed "s/,/ /"); do
|
||||||
|
frequency=$(echo $price | cut -d/ -f1)
|
||||||
|
currency=$(echo $price | cut -d/ -f2)
|
||||||
|
price_id=$(echo $price | cut -d/ -f3)
|
||||||
|
echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$final_path/settings.py"
|
||||||
|
done
|
||||||
|
|
||||||
|
ynh_store_file_checksum --file="$final_path/settings.py"
|
||||||
|
|
||||||
|
# Set permissions to app files
|
||||||
|
chown -R $app:www-data $final_path
|
||||||
|
chmod o=--- $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALISATION
|
# GENERIC FINALISATION
|
||||||
|
|
Loading…
Add table
Reference in a new issue