mirror of
https://github.com/YunoHost-Apps/rainloop_ynh.git
synced 2024-09-03 20:16:18 +02:00
commit
9c5aa8d17d
16 changed files with 130 additions and 129 deletions
21
README.md
21
README.md
|
@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
|||
|
||||
Rainloop is a lightweight webmail.
|
||||
|
||||
**Shipped version:** 1.12.1
|
||||
**Shipped version:** 1.14.0
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
@ -27,15 +27,15 @@ Rainloop is a lightweight webmail.
|
|||
|
||||
Go to http://DOMAIN.TLD/rainloop/app/?admin
|
||||
|
||||
- The default login is : admin
|
||||
- The default password is : Password chosen during install
|
||||
- The default login: admin
|
||||
- The default password: password chosen during install
|
||||
|
||||
- If you lost the admin password, you can retrieve it using ``sudo yunohost app setting rainloop password``
|
||||
- If you lost the admin password, you can retrieve it using `sudo yunohost app setting rainloop password`
|
||||
|
||||
Each user can add a remote carddav server from their own parameters interface.
|
||||
|
||||
- If you use baikal, the CardDav address is: https://DOMAIN.TLD/baikal/card.php/addressbooks/USER/default/
|
||||
- If you use NextCloud, the CardDav address is: https://DOMAIN.TLD/nextcloud/remote.php/carddav/addressbooks/USER/contacts
|
||||
- If you use Baïkal, the CardDav address is `https://DOMAIN.TLD/baikal/card.php/addressbooks/USER/default/`
|
||||
- If you use Nextcloud, the CardDav address is `https://DOMAIN.TLD/nextcloud/remote.php/carddav/addressbooks/USER/contacts`
|
||||
|
||||
## Documentation
|
||||
|
||||
|
@ -48,9 +48,8 @@ Each user can add a remote carddav server from their own parameters interface.
|
|||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/)
|
||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/)
|
||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rainloop/)
|
||||
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/rainloop%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/)
|
||||
|
||||
## Limitations
|
||||
|
||||
|
@ -62,15 +61,13 @@ Each user can add a remote carddav server from their own parameters interface.
|
|||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/rainloop_ynh/issues
|
||||
* Rainloop website: https://www.rainloop.net/
|
||||
* Rainloop github website: https://github.com/RainLoop/rainloop-webmail
|
||||
* Rainloop GitHub website: https://github.com/RainLoop/rainloop-webmail
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
---
|
||||
|
||||
Developers info
|
||||
----------------
|
||||
## Developers info
|
||||
|
||||
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
|
||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
|
|
39
README_fr.md
39
README_fr.md
|
@ -1,18 +1,18 @@
|
|||
# Rainloop pour YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/rainloop.svg)](https://dash.yunohost.org/appci/app/rainloop)
|
||||
[![Install Rainloop with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=rainloop)
|
||||
[![Integration level](https://dash.yunohost.org/integration/rainloop.svg)](https://dash.yunohost.org/appci/app/rainloop) ![](https://ci-apps.yunohost.org/ci/badges/rainloop.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/rainloop.maintain.svg)
|
||||
[![Installer Rainloop avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=rainloop)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer Rainloop rapidement et simplement sur un serveur Yunohost.
|
||||
> *Ce package vous permet d'installer Rainloop 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.*
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
Rainloop est un webmail léger.
|
||||
|
||||
**Version incluse:** 1.12.1
|
||||
**Version incluse:** 1.14.0
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
|
@ -27,19 +27,19 @@ Rainloop est un webmail léger.
|
|||
|
||||
Veuillez vous rendre sur http://DOMAIN.TLD/rainloop/app/?admin
|
||||
|
||||
- Le nom d'utilisateur admin par défaut est : admin
|
||||
- Le mot de passe admin par défaut est : Mot de passe choisi lors de l'installation
|
||||
- Si vous avez oublié votre mot de passe, vous pouvez le retrouver avec ``sudo yunohost app setting rainloop password``
|
||||
- Le nom d'utilisateur admin par défaut : admin
|
||||
- Le mot de passe admin par défaut : Mot de passe choisi lors de l'installation
|
||||
- Si vous avez oublié votre mot de passe, vous pouvez le retrouver avec `sudo yunohost app setting rainloop password`
|
||||
|
||||
Chaque utilisateur peut ajouter un carnet d'adresse distant CardDav via leurs propres paramètres.
|
||||
|
||||
- Si vous utilisez Baikal, l'adresse à renseigner est du type : https://DOMAIN.TLD/baikal/card.php/addressbooks/UTILISATEUR/default
|
||||
- Si vous utilisez NextCloud, l'adresse à renseigner est du type : https://DOMAIN.TLD/nextcloud/remote.php/carddav/addressbooks/USER/contacts
|
||||
- Si vous utilisez Baïkal, l'adresse à renseigner est du type `https://DOMAIN.TLD/baikal/card.php/addressbooks/UTILISATEUR/default`
|
||||
- Si vous utilisez Nextcloud, l'adresse à renseigner est du type `https://DOMAIN.TLD/nextcloud/remote.php/carddav/addressbooks/USER/contacts`
|
||||
|
||||
## Documentation
|
||||
|
||||
* Documentation officielle: https://www.rainloop.net/docs/configuration/
|
||||
* Documentation YunoHost: https://yunohost.org/#/app_rainloop_fr
|
||||
* Documentation officielle : https://www.rainloop.net/docs/configuration/
|
||||
* Documentation YunoHost : https://yunohost.org/#/app_rainloop_fr
|
||||
|
||||
## Caractéristiques spécifiques YunoHost
|
||||
|
||||
|
@ -47,29 +47,26 @@ Chaque utilisateur peut ajouter un carnet d'adresse distant CardDav via leurs pr
|
|||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/)
|
||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/)
|
||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rainloop/)
|
||||
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/rainloop%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/)
|
||||
|
||||
## Limitations
|
||||
|
||||
## Informations additionnelles
|
||||
|
||||
* Rainloop stocke les clés PGP privées dans le stockage de navigateur. Cela implique que vos clés seront perdues quand vous videz le stockage de navigateur (navigation incognito, changement d'ordinateur, ...). Ce paquet intègre [PGPback de chtixof](https://github.com/chtixof/pgpback_ynh) pour que vous puissiez stocker vos clés privées PGP de manière sécurisée sur le serveur. Rendez-vous **http://DOMAIN.TLD/rainloop/pgpback** pour stocker vos clés privées PGP sur le serveur ou les restaurer dans un nouveau navigateur.
|
||||
* Rainloop stocke les clés PGP privées dans le stockage de navigateur. Cela implique que vos clés seront perdues quand vous videz le stockage de navigateur (navigation incognito, changement d'ordinateur...). Ce paquet intègre [PGPback de chtixof](https://github.com/chtixof/pgpback_ynh) pour que vous puissiez stocker vos clés privées PGP de manière sécurisée sur le serveur. Rendez-vous **http://DOMAIN.TLD/rainloop/pgpback** pour stocker vos clés privées PGP sur le serveur ou les restaurer dans un nouveau navigateur.
|
||||
|
||||
## Links
|
||||
|
||||
* Signaler un bug: https://github.com/YunoHost-Apps/rainloop_ynh/issues
|
||||
* Site de Rainloop: https://www.rainloop.net/
|
||||
* Github de Rainloop: https://github.com/RainLoop/rainloop-webmail
|
||||
* Site web YunoHost: https://yunohost.org/
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/rainloop_ynh/issues
|
||||
* Site de Rainloop : https://www.rainloop.net/
|
||||
* GitHub de Rainloop : https://github.com/RainLoop/rainloop-webmail
|
||||
* Site web YunoHost : https://yunohost.org/
|
||||
|
||||
---
|
||||
|
||||
Informations pour les développeurs
|
||||
----------------
|
||||
## Informations pour les développeurs
|
||||
|
||||
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/rainloop" (PATH)
|
||||
lang="English"
|
||||
lang="en"
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
password="pass"
|
||||
ldap=1
|
||||
|
@ -29,4 +29,4 @@ Notification=none
|
|||
;;; Upgrade options
|
||||
; commit=e26b7e5823858ea5f526659f320692a2768786b5
|
||||
name=Define ereg() if it does not exists
|
||||
manifest_arg=domain=DOMAIN&path=PATH&is_public=Yes&password=password&ldap=Yes&lang=English&
|
||||
manifest_arg=domain=DOMAIN&path=PATH&is_public=Yes&password=password&ldap=Yes&lang=en&
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/RainLoop/rainloop-webmail/releases/download/v1.12.1/rainloop-community-1.12.1.zip
|
||||
SOURCE_SUM=5d7f99d0e145d22617de8c17e43f34842245d5570662f97f4352487671df811b
|
||||
SOURCE_URL=https://github.com/RainLoop/rainloop-webmail/releases/download/v1.14.0/rainloop-community-1.14.0.zip
|
||||
SOURCE_SUM=de5809c27615123d6d422bcc3d4c76868f03d292bbaba82c4392c349aa531829
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=false
|
||||
|
|
|
@ -10,7 +10,7 @@ loading_description = "RainLoop"
|
|||
favicon_url = ""
|
||||
|
||||
; Theme used by default
|
||||
theme = "Default"
|
||||
theme = "Clear"
|
||||
|
||||
; Allow theme selection on settings screen
|
||||
allow_themes = On
|
||||
|
@ -36,6 +36,8 @@ attachment_size_limit = 25
|
|||
|
||||
[interface]
|
||||
show_attachment_thumbnail = On
|
||||
use_native_scrollbars = off
|
||||
new_move_to_folder_button = on
|
||||
|
||||
[branding]
|
||||
login_logo = ""
|
||||
|
@ -79,8 +81,10 @@ admin_password = "12345"
|
|||
allow_admin_panel = On
|
||||
allow_two_factor_auth = Off
|
||||
force_two_factor_auth = Off
|
||||
allow_universal_login = Off
|
||||
hide_x_mailer_header = Off
|
||||
admin_panel_host = ""
|
||||
admin_panel_key = "admin"
|
||||
content_security_policy = ""
|
||||
core_install_access_domain = ""
|
||||
|
||||
[ssl]
|
||||
|
|
|
@ -22,7 +22,7 @@ location __PATH__/ {
|
|||
try_files $uri $uri/ index.php;
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
|
|
|
@ -33,7 +33,7 @@ group = __USER__
|
|||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock
|
||||
listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
"en": "Lightweight multi-account webmail",
|
||||
"fr": "Webmail léger multi-comptes"
|
||||
},
|
||||
"version": "1.12.1~ynh3",
|
||||
"version": "1.14.0~ynh1",
|
||||
"url": "https://www.rainloop.net/",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"maintainer": {
|
||||
"name": "scith, Djip007, polytan02"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.5.0"
|
||||
"yunohost": ">= 3.8.1"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
@ -76,8 +76,8 @@
|
|||
"en": "Select default language",
|
||||
"fr": "Definir la langue par defaut"
|
||||
},
|
||||
"choices": ["English", "Francais"],
|
||||
"default": "English"
|
||||
"choices": ["de", "en", "es", "fr", "it", "pt"],
|
||||
"default": "en"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
- *Description of why you made this PR*
|
||||
|
||||
## Solution
|
||||
- *And how you fix that*
|
||||
- *And how do you fix that problem*
|
||||
|
||||
## PR Status
|
||||
- [ ] Code finished.
|
||||
|
@ -11,14 +11,8 @@
|
|||
- [ ] Upgrade from last version tested.
|
||||
- [ ] Can be reviewed and tested.
|
||||
|
||||
## Validation
|
||||
## Package_check results
|
||||
---
|
||||
*Minor decision*
|
||||
- **Upgrade previous version** :
|
||||
- [ ] **Code review** :
|
||||
- [ ] **Approval (LGTM)** :
|
||||
- [ ] **Approval (LGTM)** :
|
||||
- **CI succeeded** :
|
||||
[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/rainloop_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/rainloop_ynh%20PR-NUM-/)
|
||||
*Please replace '-NUM-' in this link by the PR number.*
|
||||
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.
|
||||
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
|
||||
|
||||
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/rainloop_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/rainloop_ynh%20PR-NUM-%20(USERNAME)/)
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-dom"
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -19,48 +19,47 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the main app directory..."
|
||||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up nginx web server configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up php-fpm configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the MySQL database..."
|
||||
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||
|
||||
#=================================================
|
||||
# BACKUP FAIL2BAN CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up fail2ban configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
||||
|
@ -70,7 +69,6 @@ ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
|||
#=================================================
|
||||
# BACKUP LOGROTATE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up logrotate configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||
|
||||
|
@ -78,4 +76,4 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -50,7 +50,7 @@ fi
|
|||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating nginx web server configuration..." --weight=2
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
|
||||
|
||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||
|
||||
|
@ -81,7 +81,7 @@ fi
|
|||
#=================================================
|
||||
# CONFIGURE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfiguring rainloop..." --weight=2
|
||||
ynh_script_progression --message="Reconfiguring Rainloop..." --weight=2
|
||||
|
||||
application_file="$final_path/app/data/_data_/_default_/configs/application.ini"
|
||||
ynh_replace_string --match_string="default_domain = .^" --replace_string="default_domain = \"$new_domain\"" --target_file="$application_file"
|
||||
|
@ -93,7 +93,7 @@ ynh_replace_string --match_string="$old_domain${old_path%/}" --replace_string="$
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -52,6 +52,13 @@ ynh_app_setting_set --app=$app --key=lang --value=$lang
|
|||
ynh_app_setting_set --app=$app --key=password --value=$password
|
||||
ynh_app_setting_set --app=$app --key=ldap --value=$ldap
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -75,9 +82,9 @@ ynh_setup_source --dest_dir="$final_path/app"
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring nginx web server..."
|
||||
ynh_script_progression --message="Configuring NGINX web server..."
|
||||
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
@ -91,9 +98,9 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring php-fpm..." --weight=2
|
||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
|
@ -101,20 +108,7 @@ ynh_add_fpm_config
|
|||
#=================================================
|
||||
# AUTOCONFIG
|
||||
#=================================================
|
||||
ynh_script_progression --message= "Configuring rainloop..." --weight=3
|
||||
|
||||
# Set lang => define from install manifest
|
||||
case "$lang" in
|
||||
Francais)
|
||||
lang="fr"
|
||||
;;
|
||||
English)
|
||||
lang="en"
|
||||
;;
|
||||
*)
|
||||
lang="en"
|
||||
esac
|
||||
ynh_app_setting_set --app=$app --key=lang --value=$lang
|
||||
ynh_script_progression --message= "Configuring Rainloop..." --weight=3
|
||||
|
||||
# Set plugins
|
||||
# This plugin is trying to automatically grab unknown domains if users want to add external email accounts
|
||||
|
@ -196,7 +190,7 @@ chown -R $app: $final_path
|
|||
#=================================================
|
||||
# SETUP FAIL2BAN
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring fail2ban..." --weight=8
|
||||
ynh_script_progression --message="Configuring Fail2ban..." --weight=8
|
||||
|
||||
# Create a dedicated fail2ban config
|
||||
ynh_add_fail2ban_config --logpath="$final_path/app/data/_data_/_default_/logs/fail2ban/auth-fail.log" --failregex="Auth failed: ip=<HOST>.*$"
|
||||
|
@ -206,17 +200,18 @@ ynh_add_fail2ban_config --logpath="$final_path/app/data/_data_/_default_/logs/fa
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..."
|
||||
|
||||
# Make app public if necessary
|
||||
# Make app public if necessary or protect it
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
|
||||
# Everyone can access the app.
|
||||
# The "main" permission is automatically created before the install script.
|
||||
ynh_permission_update --permission "main" --add "visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -30,10 +30,18 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=2
|
|||
# Remove a database if it exists, along with the associated user
|
||||
ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing app main directory..."
|
||||
ynh_script_progression --message="Removing the app main directory..."
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
@ -41,17 +49,17 @@ ynh_secure_remove --file="$final_path"
|
|||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing nginx web server configuration..."
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..."
|
||||
|
||||
# Remove the dedicated nginx config
|
||||
# Remove the dedicated NGING config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing php-fpm configuration..." --weight=2
|
||||
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
|
||||
|
||||
# Remove the dedicated php-fpm config
|
||||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
|
@ -65,7 +73,7 @@ ynh_remove_logrotate
|
|||
#=================================================
|
||||
# REMOVE FAIL2BAN CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing fail2ban configuration..." --weight=8
|
||||
ynh_script_progression --message="Removing Fail2ban configuration..." --weight=8
|
||||
|
||||
# Remove the dedicated fail2ban config
|
||||
ynh_remove_fail2ban_config
|
||||
|
|
|
@ -19,7 +19,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..." --time --weight=2
|
||||
ynh_script_progression --message="Loading settings..." --weight=2
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -27,11 +27,12 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --time --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}"
|
||||
|
@ -49,14 +50,14 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..." --time --weight=1
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..." --time --weight=2
|
||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=2
|
||||
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd
|
||||
|
@ -65,7 +66,7 @@ ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./
|
|||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --time --weight=2
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=2
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
@ -81,12 +82,20 @@ chown -R $app: $final_path
|
|||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE FAIL2BAN CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the fail2ban configuration..." --time --weight=6
|
||||
ynh_script_progression --message="Restoring the Fail2ban configuration..." --weight=6
|
||||
|
||||
ynh_restore_file "/etc/fail2ban/jail.d/$app.conf"
|
||||
ynh_restore_file "/etc/fail2ban/filter.d/$app.conf"
|
||||
|
@ -103,13 +112,13 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
|||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server and php-fpm..." --time --weight=1
|
||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=php7.0-fpm --action=reload
|
||||
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Restoration completed for $app" --time --last
|
||||
ynh_script_progression --message="Restoration completed for $app" --last
|
||||
|
|
|
@ -58,7 +58,7 @@ fi
|
|||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=4
|
||||
ynh_script_progression --message="Backing up Rainloop before upgrading (may take a while)..." --weight=4
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -93,11 +93,18 @@ fi
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -109,9 +116,9 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=2
|
||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
|
@ -119,7 +126,7 @@ ynh_add_fpm_config
|
|||
#=================================================
|
||||
# UPDATE SSO AND PGP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading rainloop configuration..."
|
||||
ynh_script_progression --message="Upgrading Rainloop configuration..."
|
||||
|
||||
# Upgrade time_offset value for fail2ban
|
||||
# FIXME Temporary fix for rainloop, waiting for https://github.com/YunoHost/yunohost/pull/752 to be released.
|
||||
|
@ -161,27 +168,15 @@ find $final_path/. -type f -exec chmod 644 {} \;
|
|||
#=================================================
|
||||
# UPGRADE FAIL2BAN
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfiguring fail2ban..." --weight=9
|
||||
ynh_script_progression --message="Reconfiguring Fail2ban..." --weight=9
|
||||
|
||||
# Create a dedicated fail2ban config
|
||||
ynh_add_fail2ban_config --logpath="$final_path/app/data/_data_/_default_/logs/fail2ban/auth-fail.log" --failregex="Auth failed: ip=<HOST>.*$"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading SSOwat configuration..."
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# unprotected_uris allows SSO credentials to be passed anyway
|
||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
Loading…
Reference in a new issue