1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mytinytodo_ynh.git synced 2024-09-03 19:46:01 +02:00
* [autopatch] Automatic patch attempt for helpers 2.1 (#60)

* [autopatch] Automatic patch attempt for helpers 2.1

* cleaning

---------

Co-authored-by: Yunohost-Bot <>
Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>

* Auto-update READMEs

* Update manifest.toml

* Auto-update READMEs

* Update DESCRIPTION_fr.md

* Auto-update READMEs

---------

Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
eric_G 2024-09-02 14:47:01 +02:00 committed by GitHub
parent ba8fc3b174
commit 975b2a7f18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 185 additions and 264 deletions

2
.gitignore vendored
View file

@ -1,2 +1,4 @@
*.swp
*~
*.sw[op]
.DS_Store

View file

@ -5,4 +5,6 @@
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
- [Прочитать README на русский](README_ru.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# myTinyTodo for YunoHost
[![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Working status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) ![Working status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Install myTinyTodo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
@ -30,7 +30,7 @@ Simple way to manage your todo lists.
- Password protection
**Shipped version:** 1.8.1~ynh1
**Shipped version:** 1.8.1~ynh2
**Demo:** <https://www.mytinytodo.net/demo/>

View file

@ -5,7 +5,7 @@ No se debe editar a mano.
# myTinyTodo para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Instalar myTinyTodo con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
@ -30,7 +30,7 @@ Simple way to manage your todo lists.
- Password protection
**Versión actual:** 1.8.1~ynh1
**Versión actual:** 1.8.1~ynh2
**Demo:** <https://www.mytinytodo.net/demo/>

View file

@ -5,7 +5,7 @@ EZ editatu eskuz.
# myTinyTodo YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Integrazio maila](https://dash.yunohost.org/integration/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Instalatu myTinyTodo YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
@ -30,7 +30,7 @@ Simple way to manage your todo lists.
- Password protection
**Paketatutako bertsioa:** 1.8.1~ynh1
**Paketatutako bertsioa:** 1.8.1~ynh2
**Demoa:** <https://www.mytinytodo.net/demo/>

View file

@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# myTinyTodo pour YunoHost
[![Niveau dintégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Niveau dintégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Installer myTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
@ -17,6 +17,7 @@ Il NE doit PAS être modifié à la main.
## Vue densemble
myTinyTodo permet de Gérer efficacement vos listes de tâches.
### Caractéristiques
- Plusieurs listes
@ -29,7 +30,7 @@ myTinyTodo permet de Gérer efficacement vos listes de tâches.
- Mot de passe de protection
**Version incluse:** 1.8.1~ynh1
**Version incluse:** 1.8.1~ynh2
**Démo:** <https://www.mytinytodo.net/demo/>

View file

@ -5,7 +5,7 @@ NON debe editarse manualmente.
# myTinyTodo para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Instalar myTinyTodo con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
@ -30,7 +30,7 @@ Simple way to manage your todo lists.
- Password protection
**Versión proporcionada:** 1.8.1~ynh1
**Versión proporcionada:** 1.8.1~ynh2
**Demo:** <https://www.mytinytodo.net/demo/>

61
README_id.md Normal file
View file

@ -0,0 +1,61 @@
<!--
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Ini TIDAK boleh diedit dengan tangan.
-->
# myTinyTodo untuk YunoHost
[![Tingkat integrasi](https://dash.yunohost.org/integration/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Pasang myTinyTodo dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
> *Paket ini memperbolehkan Anda untuk memasang myTinyTodo secara cepat dan mudah pada server YunoHost.*
> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
## Ringkasan
Simple way to manage your todo lists.
### Features
- Multiple lists
- Task notes
- Tags (and tag cloud)
- Due dates
- Priority (-1, 0, +1, +2)
- Different sortings including sort by drag-and-drop
- Search
- Password protection
**Versi terkirim:** 1.8.1~ynh2
**Demo:** <https://www.mytinytodo.net/demo/>
## Tangkapan Layar
![Tangkapan Layar pada myTinyTodo](./doc/screenshots/shot-v14b1.png)
## Dokumentasi dan sumber daya
- Website aplikasi resmi: <http://www.mytinytodo.net/>
- Dokumentasi admin resmi: <https://www.mytinytodo.net/faq.php>
- Depot kode aplikasi hulu: <https://github.com/maxpozdeev/mytinytodo>
- Gudang YunoHost: <https://apps.yunohost.org/app/mytinytodo>
- Laporkan bug: <https://github.com/YunoHost-Apps/mytinytodo_ynh/issues>
## Info developer
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing).
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug
atau
sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug
```
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>

61
README_ru.md Normal file
View file

@ -0,0 +1,61 @@
<!--
Важно: этот README был автоматически сгенерирован <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Он НЕ ДОЛЖЕН редактироваться вручную.
-->
# myTinyTodo для YunoHost
[![Уровень интеграции](https://dash.yunohost.org/integration/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![Установите myTinyTodo с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
*[Прочтите этот README на других языках.](./ALL_README.md)*
> *Этот пакет позволяет Вам установить myTinyTodo быстро и просто на YunoHost-сервер.*
> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
## Обзор
Simple way to manage your todo lists.
### Features
- Multiple lists
- Task notes
- Tags (and tag cloud)
- Due dates
- Priority (-1, 0, +1, +2)
- Different sortings including sort by drag-and-drop
- Search
- Password protection
**Поставляемая версия:** 1.8.1~ynh2
**Демо-версия:** <https://www.mytinytodo.net/demo/>
## Снимки экрана
![Снимок экрана myTinyTodo](./doc/screenshots/shot-v14b1.png)
## Документация и ресурсы
- Официальный веб-сайт приложения: <http://www.mytinytodo.net/>
- Официальная документация администратора: <https://www.mytinytodo.net/faq.php>
- Репозиторий кода главной ветки приложения: <https://github.com/maxpozdeev/mytinytodo>
- Магазин YunoHost: <https://apps.yunohost.org/app/mytinytodo>
- Сообщите об ошибке: <https://github.com/YunoHost-Apps/mytinytodo_ynh/issues>
## Информация для разработчиков
Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing).
Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug
или
sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug
```
**Больше информации о пакетировании приложений:** <https://yunohost.org/packaging_apps>

View file

@ -5,7 +5,7 @@
# YunoHost 上的 myTinyTodo
[![集成程度](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![工作状态](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![集成程度](https://dash.yunohost.org/integration/mytinytodo.svg)](https://ci-apps.yunohost.org/ci/apps/mytinytodo/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg)
[![使用 YunoHost 安装 myTinyTodo](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo)
@ -30,7 +30,7 @@ Simple way to manage your todo lists.
- Password protection
**分发版本:** 1.8.1~ynh1
**分发版本:** 1.8.1~ynh2
**演示:** <https://www.mytinytodo.net/demo/>

View file

@ -1,4 +0,0 @@
; Additional php.ini defines, specific to this pool of workers.
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M

View file

@ -12,7 +12,7 @@ location __PATH__/ {
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock;
fastcgi_index index.php;
include fastcgi_params;

View file

@ -1,19 +0,0 @@
version = "1.0"
[main]
name = "myTinyTodo configuration"
[main.config]
name = "Configuration Options"
[main.config.title]
ask = "Set title"
type = "string"
help = "Specify a title for your todolist."
bind = "title:__INSTALL_DIR__/config.php"
[main.config.set_password]
ask = "Set password"
type = "password"
help = "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist."
bind = "password:__INSTALL_DIR__/config.php"

BIN
doc/.DS_Store vendored

Binary file not shown.

View file

@ -1,4 +1,5 @@
myTinyTodo permet de Gérer efficacement vos listes de tâches.
### Caractéristiques
- Plusieurs listes

View file

@ -5,7 +5,7 @@ name = "myTinyTodo"
description.en = "Open source to-do list script"
description.fr = "Gestionnaire de todo list"
version = "1.8.1~ynh1"
version = "1.8.1~ynh2"
maintainers = ["plabuse"]
@ -17,7 +17,8 @@ admindoc = "https://www.mytinytodo.net/faq.php"
code = "https://github.com/maxpozdeev/mytinytodo"
[integration]
yunohost = ">= 11.2"
yunohost = ">= 11.2.29"
helpers_version = "2.1"
architectures = "all"
multi_instance = false
@ -54,6 +55,7 @@ ram.runtime = "50M"
[resources.system_user]
[resources.install_dir]
group = "www-data:r-x"
[resources.permissions]
main.url = "/"

View file

@ -1,17 +1,5 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================

View file

@ -1,46 +1,33 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
ynh_print_info "Declaring files to be backed up..."
#=================================================
# BACKUP OF THE MAIN DIR OF THE APP
#=================================================
ynh_backup --src_path="$install_dir"
ynh_backup "$install_dir"
#=================================================
# BACKUP OF THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
ynh_print_info --message="Backing up the MySQL database..."
ynh_print_info "Backing up the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql
ynh_mysql_dump_db > db.sql
#=================================================
# 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 "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -1,22 +1,16 @@
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
ynh_script_progression "Updating NGINX web server configuration..."
ynh_change_url_nginx_config
ynh_config_change_url_nginx
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last
ynh_script_progression "Change of URL completed for $app"

View file

@ -1,102 +0,0 @@
#!/bin/bash
# In simple cases, you don't need a config script.
# With a simple config_panel.toml, you can write in the app settings, in the
# upstream config file or replace complete files (logo ...) and restart services.
# The config scripts allows you to go further, to handle specific cases
# (validation of several interdependent fields, specific getter/setter for a value,
# display dynamic informations or choices, pre-loading of config type .cube... ).
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
ynh_abort_if_errors
#=================================================
# RETRIEVE ARGUMENTS
#=================================================
final_path=$(ynh_app_setting_get $app final_path)
#=================================================
# SPECIFIC GETTERS FOR TOML SHORT KEY
#=================================================
get__amount() {
# Here we can imagine to have an API call to stripe to know the amount of donation during a month
local amount = 200
# It's possible to change some properties of the question by overriding it:
if [ $amount -gt 100 ]
then
cat << EOF
style: success
value: $amount
ask:
en: A lot of donation this month: **$amount €**
EOF
else
cat << EOF
style: danger
value: $amount
ask:
en: Not so much donation this month: $amount €
EOF
fi
}
get__prices() {
local prices = "$(grep "DONATION\['" "$final_path/settings.py" | sed -r "s@^DONATION\['([^']*)'\]\['([^']*)'\] = '([^']*)'@\1/\2/\3@g" | sed -z 's/\n/,/g;s/,$/\n/')"
if [ "$prices" == "," ];
then
# Return YNH_NULL if you prefer to not return a value at all.
echo YNH_NULL
else
echo $prices
fi
}
#=================================================
# SPECIFIC VALIDATORS FOR TOML SHORT KEYS
#=================================================
validate__publishable_key() {
# We can imagine here we test if the key is really a publisheable key
(is_secret_key $publishable_key) &&
echo 'This key seems to be a secret key'
}
#=================================================
# SPECIFIC SETTERS FOR TOML SHORT KEYS
#=================================================
set__prices() {
#---------------------------------------------
# IMPORTANT: setter are trigger only if a change is detected
#---------------------------------------------
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)
sed "d/DONATION\['$frequency'\]\['$currency'\]" "$final_path/settings.py"
echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$final_path/settings.py"
done
#---------------------------------------------
# IMPORTANT: to be able to upgrade properly, you have to saved the value in settings too
#---------------------------------------------
ynh_app_setting_set $app prices $prices
}
#=================================================
# GENERIC FINALIZATION
#=================================================
ynh_app_config_run $1

View file

@ -1,56 +1,43 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CREATE A MYSQL DATABASE
#=================================================
ynh_script_progression --message="Creating a MySQL database..." --weight=2
ynh_script_progression "Creating a MySQL database..."
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ../conf/sql/mytinytodo.sql
ynh_mysql_db_shell < ../conf/sql/mytinytodo.sql
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=3
ynh_script_progression "Setting up source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
ynh_script_progression "Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
ynh_config_add_phpfpm
# Create a dedicated NGINX config
ynh_add_nginx_config
ynh_config_add_nginx
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_script_progression "Adding $app's configuration..."
salt=$(ynh_string_random --length=16)
ynh_add_config --template="config.php" --destination="$install_dir/config.php"
chmod 640 "$install_dir/config.php"
chown $app:$app "$install_dir/config.php"
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --last
ynh_script_progression "Installation of $app completed"

View file

@ -1,27 +1,19 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
ynh_script_progression "Removing NGINX web server configuration..."
# Remove the dedicated NGINX config
ynh_remove_nginx_config
ynh_config_remove_nginx
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
ynh_config_remove_phpfpm
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last
ynh_script_progression "Removal of $app completed"

View file

@ -1,47 +1,36 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=2
ynh_script_progression "Restoring the app main directory..."
ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
ynh_restore "$install_dir"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=2
ynh_script_progression "Reconfiguring PHP-FPM..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql
ynh_mysql_db_shell < ./db.sql
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=2
ynh_script_progression "Reloading NGINX web server and PHP-FPM..."
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload
ynh_systemctl --service=php$php_version-fpm --action=reload
ynh_systemctl --service=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --last
ynh_script_progression "Restoration completed for $app"

View file

@ -1,48 +1,27 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Upgrading source files..."
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=2
ynh_setup_source --dest_dir="$install_dir" --keep="db config.php"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="db config.php"
fi
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
ynh_script_progression "Upgrading PHP-FPM configuration..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
ynh_config_add_phpfpm
# Create a dedicated NGINX config
ynh_add_nginx_config
ynh_config_add_nginx
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last
ynh_script_progression "Upgrade of $app completed"