mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
commit
523477a47c
18 changed files with 322 additions and 345 deletions
60
README.md
60
README.md
|
@ -1,3 +1,8 @@
|
||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
# Roundcube for YunoHost
|
# Roundcube for YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/roundcube.svg)](https://dash.yunohost.org/appci/app/roundcube) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.maintain.svg)
|
[![Integration level](https://dash.yunohost.org/integration/roundcube.svg)](https://dash.yunohost.org/appci/app/roundcube) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.maintain.svg)
|
||||||
|
@ -5,31 +10,29 @@
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
> *This package allow you to install Roundcube quickly and simply on a YunoHost server.
|
> *This package allows you to install Roundcube quickly and simply on a YunoHost server.
|
||||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
[Roundcube](https://roundcube.net/) is a browser-based multilingual IMAP client with an application-like user interface.
|
|
||||||
|
|
||||||
**Shipped version:** 1.4.11
|
Roundcube is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching and spell checking.
|
||||||
|
|
||||||
## Screenshots
|
### Features
|
||||||
|
|
||||||
![](https://roundcube.net/screens/skins/elastic/desktop/screens/mailbox_widescreen.png)
|
- CardDAV to connect with baïkal or Nextcloud
|
||||||
|
- Support for PGP encryption with Enigma plugin
|
||||||
|
|
||||||
## Demo
|
|
||||||
|
|
||||||
* [YunoHost demo](https://demo.yunohost.org/webmail/)
|
**Shipped version:** 1.5.0~ynh1
|
||||||
|
|
||||||
|
**Demo:** https://demo.yunohost.org/webmail/
|
||||||
|
|
||||||
|
## Disclaimers / important information
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can extend - or even override - the Roundcube configuration which is coming with this package in the file `conf/local.inc.php`. Do not edit the file `conf/config.inc.php` as future upgrades will overwrite it.
|
You can extend - or even override - the Roundcube configuration which is coming with this package in the file `conf/local.inc.php`. Do not edit the file `conf/config.inc.php` as future upgrades will overwrite it.
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
* Official documentation: https://github.com/roundcube/roundcubemail/wiki
|
|
||||||
* YunoHost documentation: https://github.com/YunoHost/doc/blob/master/app_roundcube.md:
|
|
||||||
|
|
||||||
## YunoHost specific features
|
## YunoHost specific features
|
||||||
|
|
||||||
In addition to Roundcube core features, the following are made available with this package:
|
In addition to Roundcube core features, the following are made available with this package:
|
||||||
|
@ -37,22 +40,12 @@ In addition to Roundcube core features, the following are made available with th
|
||||||
* Synchronize your email aliases as identities in Roundcube
|
* Synchronize your email aliases as identities in Roundcube
|
||||||
* Install the [contextmenu](https://plugins.roundcube.net/packages/johndoh/contextmenu) and [automatic addressbook](https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook) plugins by default
|
* Install the [contextmenu](https://plugins.roundcube.net/packages/johndoh/contextmenu) and [automatic addressbook](https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook) plugins by default
|
||||||
* Allow to install the [CardDAV](https://plugins.roundcube.net/packages/roundcube/carddav) (address book) synchronization plugin at the installation - note that if you have installed Nextcloud or Baïkal, it will automatically add the corresponding and existing address book.
|
* Allow to install the [CardDAV](https://plugins.roundcube.net/packages/roundcube/carddav) (address book) synchronization plugin at the installation - note that if you have installed Nextcloud or Baïkal, it will automatically add the corresponding and existing address book.
|
||||||
|
* Support for PGP encryption with Enigma plugin by default.
|
||||||
|
|
||||||
#### Multi-users support
|
#### Multi-users support
|
||||||
|
|
||||||
* Integrate with YunoHost users and SSO - i.e logout button, YunoHost users search
|
* Integrate with YunoHost users and SSO - i.e logout button, YunoHost users search
|
||||||
|
|
||||||
#### Supported architectures
|
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/roundcube%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/roundcube/)
|
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/roundcube%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/roundcube/)
|
|
||||||
|
|
||||||
## Limitations
|
|
||||||
|
|
||||||
* No known limitations.
|
|
||||||
|
|
||||||
## Additional information
|
|
||||||
|
|
||||||
#### Plugins
|
#### Plugins
|
||||||
|
|
||||||
You can also install other plugins - which will not be removed with upgrades. To do so, you can use the official [Plugin Repository](https://plugins.roundcube.net/).
|
You can also install other plugins - which will not be removed with upgrades. To do so, you can use the official [Plugin Repository](https://plugins.roundcube.net/).
|
||||||
|
@ -90,18 +83,17 @@ Note that you should also check the plugin homepage for additional installation
|
||||||
|
|
||||||
You can also download the plugin and put it under the `plugins/` directory. In this case, do not forget to change ownerships of this folder to `roundcube`.
|
You can also download the plugin and put it under the `plugins/` directory. In this case, do not forget to change ownerships of this folder to `roundcube`.
|
||||||
|
|
||||||
## Links
|
## Documentation and resources
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/roundcube_ynh/issues
|
* Official app website: https://roundcube.net/
|
||||||
* Roundcube website: https://roundcube.net/
|
* Official admin documentation: https://github.com/roundcube/roundcubemail/wiki
|
||||||
* Roundcube repository: https://github.com/roundcube/roundcubemail
|
* Upstream app code repository: https://github.com/roundcube/roundcubemail
|
||||||
* YunoHost website: https://yunohost.org/
|
* YunoHost documentation for this app: https://yunohost.org/app_roundcube
|
||||||
|
* Report a bug: https://github.com/YunoHost-Apps/roundcube_ynh/issues
|
||||||
|
|
||||||
---
|
## Developer info
|
||||||
|
|
||||||
## Developers info
|
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing).
|
||||||
|
|
||||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing).
|
|
||||||
|
|
||||||
To try the testing branch, please proceed like that.
|
To try the testing branch, please proceed like that.
|
||||||
```
|
```
|
||||||
|
@ -109,3 +101,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/roundcube_ynh/tree/te
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing --debug
|
sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
50
README_fr.md
50
README_fr.md
|
@ -1,35 +1,28 @@
|
||||||
# Roundcube pour YunoHost
|
# Roundcube pour YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/roundcube.svg)](https://dash.yunohost.org/appci/app/roundcube) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.maintain.svg)
|
[![Niveau d'intégration](https://dash.yunohost.org/integration/roundcube.svg)](https://dash.yunohost.org/appci/app/roundcube) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/roundcube.maintain.svg)
|
||||||
[![Installer Roundcube avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=roundcube)
|
[![Installer Roundcube avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=roundcube)
|
||||||
|
|
||||||
*[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 Roundcube rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d'installer Roundcube rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
## Overview
|
## Vue d'ensemble
|
||||||
[Roundcube](https://roundcube.net/) est un client IMAP multilingue basé sur un navigateur avec une interface utilisateur semblable à une application.
|
|
||||||
|
|
||||||
**Shipped version:** 1.4.11
|
Roundcube est un client IMAP multilingue basé sur un navigateur avec une interface utilisateur semblable à une application.
|
||||||
|
|
||||||
## Screenshots
|
**Version incluse :** 1.5.0~ynh1
|
||||||
|
|
||||||
![](https://roundcube.net/screens/skins/elastic/desktop/screens/mailbox_widescreen.png)
|
**Démo :** https://demo.yunohost.org/webmail/
|
||||||
|
|
||||||
## Démo
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
* [Démo YunoHost](https://demo.yunohost.org/webmail/)
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Vous pouvez étendre (ou même remplacer) la configuration de Roundcube fournie avec ce paquet dans le fichier `conf/local.inc.php`. Ne modifiez pas le fichier `conf/config.inc.php` car les futures mises à jour le remplaceront.
|
Vous pouvez étendre (ou même remplacer) la configuration de Roundcube fournie avec ce paquet dans le fichier `conf/local.inc.php`. Ne modifiez pas le fichier `conf/config.inc.php` car les futures mises à jour le remplaceront.
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
* Documentation officielle : https://github.com/roundcube/roundcubemail/wiki
|
|
||||||
* Documentation YunoHost : https://github.com/YunoHost/doc/blob/master/app_roundcube.md:
|
|
||||||
|
|
||||||
## Caractéristiques spécifiques YunoHost
|
## Caractéristiques spécifiques YunoHost
|
||||||
|
|
||||||
En plus des fonctionnalités principales de Roundcube, les éléments suivants sont disponibles avec ce paquet :
|
En plus des fonctionnalités principales de Roundcube, les éléments suivants sont disponibles avec ce paquet :
|
||||||
|
@ -38,22 +31,12 @@ En plus des fonctionnalités principales de Roundcube, les éléments suivants s
|
||||||
* Installation des plugins [contextmenu](https://plugins.roundcube.net/packages/johndoh/contextmenu)
|
* Installation des plugins [contextmenu](https://plugins.roundcube.net/packages/johndoh/contextmenu)
|
||||||
et [automatic addressbook](https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook) par default.
|
et [automatic addressbook](https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook) par default.
|
||||||
* Permettre d'installer [CardDAV](https://plugins.roundcube.net/packages/roundcube/carddav) (carnet d'adresses) de synchronisation à l'installation - notez que si vous avez installé Nextcloud ou Baïkal, il ajoutera automatiquement le carnet d'adresses correspondant.
|
* Permettre d'installer [CardDAV](https://plugins.roundcube.net/packages/roundcube/carddav) (carnet d'adresses) de synchronisation à l'installation - notez que si vous avez installé Nextcloud ou Baïkal, il ajoutera automatiquement le carnet d'adresses correspondant.
|
||||||
|
* Prise en charge du cryptage PGP avec le plugin Enigma installé par default.
|
||||||
|
|
||||||
#### Support multi-utilisateur
|
#### Support multi-utilisateur
|
||||||
|
|
||||||
* Intégration avec les utilisateurs YunoHost et SSO - c'est-à-dire le bouton de déconnexion, reconnaissance des autres utilisateurs de l'instance YunoHost.
|
* Intégration avec les utilisateurs YunoHost et SSO - c'est-à-dire le bouton de déconnexion, reconnaissance des autres utilisateurs de l'instance YunoHost.
|
||||||
|
|
||||||
#### Supported architectures
|
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/roundcube%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/roundcube/)
|
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/roundcube%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/roundcube/)
|
|
||||||
|
|
||||||
## Limitations
|
|
||||||
|
|
||||||
* Aucune limitation connue.
|
|
||||||
|
|
||||||
## Additional information
|
|
||||||
|
|
||||||
#### Plugins
|
#### Plugins
|
||||||
|
|
||||||
Vous pouvez également installer d'autres plugins (qui ne seront pas supprimés avec les mises à niveau). Pour cela, vous pouvez utiliser le [Plugin Repository](https://plugins.roundcube.net/) officiel.
|
Vous pouvez également installer d'autres plugins (qui ne seront pas supprimés avec les mises à niveau). Pour cela, vous pouvez utiliser le [Plugin Repository](https://plugins.roundcube.net/) officiel.
|
||||||
|
@ -91,14 +74,13 @@ Notez que vous devez également consulter la page d'accueil du plugin pour conna
|
||||||
|
|
||||||
Vous pouvez également télécharger le plugin et le placer dans le répertoire `plugins /`. Dans ce cas, n'oubliez pas de changer la propriété de ce dossier en `roundcube`.
|
Vous pouvez également télécharger le plugin et le placer dans le répertoire `plugins /`. Dans ce cas, n'oubliez pas de changer la propriété de ce dossier en `roundcube`.
|
||||||
|
|
||||||
## Liens
|
## Documentations et ressources
|
||||||
|
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/roundcube_ynh/issues
|
* Site officiel de l'app : https://roundcube.net/
|
||||||
* Site de l'application : https://roundcube.net/
|
* Documentation officielle de l'admin : https://github.com/roundcube/roundcubemail/wiki
|
||||||
* Dépôt de l'application principale : https://github.com/roundcube/roundcubemail
|
* Dépôt de code officiel de l'app : https://github.com/roundcube/roundcubemail
|
||||||
* Site web YunoHost : https://yunohost.org/
|
* Documentation YunoHost pour cette app : https://yunohost.org/app_roundcube
|
||||||
|
* Signaler un bug : https://github.com/YunoHost-Apps/roundcube_ynh/issues
|
||||||
---
|
|
||||||
|
|
||||||
## Informations pour les développeurs
|
## Informations pour les développeurs
|
||||||
|
|
||||||
|
@ -110,3 +92,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/roundcube_ynh/tree/te
|
||||||
ou
|
ou
|
||||||
sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing --debug
|
sudo yunohost app upgrade roundcube -u https://github.com/YunoHost-Apps/roundcube_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
|
@ -4,7 +4,6 @@
|
||||||
path="/path"
|
path="/path"
|
||||||
language="en_GB"
|
language="en_GB"
|
||||||
with_carddav=1
|
with_carddav=1
|
||||||
with_enigma=1
|
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
|
@ -16,7 +15,6 @@
|
||||||
upgrade=1 from_commit=67cb9813b18254b5f478d9a2974862d0a3af40e5
|
upgrade=1 from_commit=67cb9813b18254b5f478d9a2974862d0a3af40e5
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/roundcube/roundcubemail/releases/download/1.4.11/roundcubemail-1.4.11.tar.gz
|
SOURCE_URL=https://github.com/roundcube/roundcubemail/releases/download/1.5.0/roundcubemail-1.5.0.tar.gz
|
||||||
SOURCE_SUM=524a6c8095508b8d911c0c5121ea6d16ca4c42894e10aaa0e29ded983687923c
|
SOURCE_SUM=f204b412f930ef6af9832d9afa95640803b7b94c3028450b0f94f56cdc4bbe1d
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=
|
|
||||||
|
|
|
@ -2,19 +2,14 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
+-----------------------------------------------------------------------+
|
+-----------------------------------------------------------------------+
|
||||||
| YunoHost configuration for the Roundcube Webmail installation. |
|
| Local configuration for the Roundcube Webmail installation. |
|
||||||
| |
|
| |
|
||||||
| This is based on the sample configuration file which is shipped with |
|
| This is a sample configuration file only containing the minimum |
|
||||||
| Roundcube and adapted to works with YunoHost. It comes with some |
|
| setup required for a functional installation. Copy more options |
|
||||||
| additionnal activated plugins for a better integration and |
|
| from defaults.inc.php to this file to override the defaults. |
|
||||||
| experience. |
|
|
||||||
| |
|
|
||||||
| You can override and extend this configuration in local.inc.php. |
|
|
||||||
| |
|
|
||||||
| DO NOT EDIT THIS FILE BY HAND, IT WILL BE OVERWRITTEN AT UPGRADES. |
|
|
||||||
| |
|
| |
|
||||||
| This file is part of the Roundcube Webmail client |
|
| This file is part of the Roundcube Webmail client |
|
||||||
| Copyright (C) 2005-2013, The Roundcube Dev Team |
|
| Copyright (C) The Roundcube Dev Team |
|
||||||
| |
|
| |
|
||||||
| Licensed under the GNU General Public License version 3 or |
|
| Licensed under the GNU General Public License version 3 or |
|
||||||
| any later version with exceptions for skins & plugins. |
|
| any later version with exceptions for skins & plugins. |
|
||||||
|
@ -29,26 +24,28 @@ $config = array();
|
||||||
|
|
||||||
// Database connection string (DSN) for read+write operations
|
// Database connection string (DSN) for read+write operations
|
||||||
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
|
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
|
||||||
// Currently supported db_providers: mysql, pgsql, sqlite, mssql or sqlsrv
|
// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle
|
||||||
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
|
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
|
||||||
// NOTE: for SQLite use absolute path: 'sqlite:////full/path/to/sqlite.db?mode=0646'
|
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
|
||||||
$config['db_dsnw'] = 'mysql://__DBUSER__:__DBPASS__@localhost/__DBNAME__';
|
// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
|
||||||
|
$config['db_dsnw'] = 'mysql://__DB_NAME__:__DB_PWD__@localhost/__DB_NAME__';
|
||||||
|
|
||||||
// The mail host chosen to perform the log-in.
|
// The IMAP host chosen to perform the log-in.
|
||||||
// Leave blank to show a textbox at login, give a list of hosts
|
// Leave blank to show a textbox at login, give a list of hosts
|
||||||
// to display a pulldown menu or set one host as string.
|
// to display a pulldown menu or set one host as string.
|
||||||
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
|
// Enter hostname with prefix ssl:// to use Implicit TLS, or use
|
||||||
|
// prefix tls:// to use STARTTLS.
|
||||||
// Supported replacement variables:
|
// Supported replacement variables:
|
||||||
// %n - hostname ($_SERVER['SERVER_NAME'])
|
// %n - hostname ($_SERVER['SERVER_NAME'])
|
||||||
// %t - hostname without the first part
|
// %t - hostname without the first part
|
||||||
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
|
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
|
||||||
// %s - domain name after the '@' from e-mail address provided at login screen
|
// %s - domain name after the '@' from e-mail address provided at login screen
|
||||||
// For example %n = mail.domain.tld, %t = domain.tld
|
// For example %n = mail.domain.tld, %t = domain.tld
|
||||||
$config['default_host'] = 'localhost';
|
$config['default_host'] = '%t';
|
||||||
|
|
||||||
// SMTP server host (for sending mails).
|
// SMTP server host (for sending mails).
|
||||||
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
|
// Enter hostname with prefix ssl:// to use Implicit TLS, or use
|
||||||
// If left blank, the PHP mail() function is used
|
// prefix tls:// to use STARTTLS.
|
||||||
// Supported replacement variables:
|
// Supported replacement variables:
|
||||||
// %h - user's IMAP hostname
|
// %h - user's IMAP hostname
|
||||||
// %n - hostname ($_SERVER['SERVER_NAME'])
|
// %n - hostname ($_SERVER['SERVER_NAME'])
|
||||||
|
@ -56,10 +53,11 @@ $config['default_host'] = 'localhost';
|
||||||
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
|
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
|
||||||
// %z - IMAP domain (IMAP hostname without the first part)
|
// %z - IMAP domain (IMAP hostname without the first part)
|
||||||
// For example %n = mail.domain.tld, %t = domain.tld
|
// For example %n = mail.domain.tld, %t = domain.tld
|
||||||
|
// To specify different SMTP servers for different IMAP hosts provide an array
|
||||||
|
// of IMAP host (no prefix or port) and SMTP server e.g. ['imap.example.com' => 'smtp.example.net']
|
||||||
$config['smtp_server'] = 'tls://' . $main_domain;
|
$config['smtp_server'] = 'tls://' . $main_domain;
|
||||||
|
|
||||||
// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
|
// SMTP port. Use 25 for cleartext, 465 for Implicit TLS, or 587 for STARTTLS (default)
|
||||||
// deprecated SSL over SMTP (aka SMTPS))
|
|
||||||
$config['smtp_port'] = 587;
|
$config['smtp_port'] = 587;
|
||||||
|
|
||||||
// SMTP username (if required) if you use %u as the username Roundcube
|
// SMTP username (if required) if you use %u as the username Roundcube
|
||||||
|
@ -90,9 +88,9 @@ $config['support_url'] = 'https://forum.yunohost.org/t/roundcube-a-webmail/3965'
|
||||||
// Name your service. This is displayed on the login screen and in the window title
|
// Name your service. This is displayed on the login screen and in the window title
|
||||||
$config['product_name'] = 'YunoHost Webmail';
|
$config['product_name'] = 'YunoHost Webmail';
|
||||||
|
|
||||||
// this key is used to encrypt the users imap password which is stored
|
// This key is used to encrypt the users imap password which is stored
|
||||||
// in the session record (and the client cookie if remember password is enabled).
|
// in the session record. For the default cipher method it must be
|
||||||
// please provide a string of exactly 24 chars.
|
// exactly 24 characters long.
|
||||||
// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
|
// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
|
||||||
$config['des_key'] = '__DESKEY__';
|
$config['des_key'] = '__DESKEY__';
|
||||||
|
|
||||||
|
@ -126,24 +124,24 @@ $config['ldap_public']['yunohost'] = array(
|
||||||
'hidden' => false,
|
'hidden' => false,
|
||||||
'searchonly' => true,
|
'searchonly' => true,
|
||||||
'fieldmap' => array(
|
'fieldmap' => array(
|
||||||
'name' => 'uid',
|
'name' => 'uid',
|
||||||
'surname' => 'sn',
|
'surname' => 'sn',
|
||||||
'firstname' => 'givenName',
|
'firstname' => 'givenName',
|
||||||
'email' => 'mail:*',
|
'email' => 'mail:*',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// List of active plugins (in plugins/ directory)
|
// List of active plugins (in plugins/ directory)
|
||||||
$config['plugins'] = array(
|
$config['plugins'] = array(
|
||||||
'archive',
|
'archive',
|
||||||
'zipdownload',
|
'zipdownload',
|
||||||
// additionnal plugins
|
// additionnal plugins
|
||||||
'http_authentication',
|
'http_authentication',
|
||||||
'managesieve',
|
'managesieve',
|
||||||
'markasjunk',
|
'markasjunk',
|
||||||
'new_user_dialog',
|
'new_user_dialog',
|
||||||
'new_user_identity',
|
'new_user_identity',
|
||||||
// installed plugins
|
'enigma',
|
||||||
);
|
);
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
@ -191,11 +189,5 @@ $config['ldapAliasSync'] = array(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// ----------------------------------
|
// skin name: folder from skins/
|
||||||
// LOCAL CONFIGURATION
|
$config['skin'] = 'elastic';
|
||||||
// ----------------------------------
|
|
||||||
|
|
||||||
$local_config = dirname(__FILE__) . '/local.inc.php';
|
|
||||||
if (file_exists($local_config)) {
|
|
||||||
include $local_config;
|
|
||||||
}
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ $config['enigma_debug'] = false;
|
||||||
|
|
||||||
// REQUIRED! Keys directory for all users.
|
// REQUIRED! Keys directory for all users.
|
||||||
// Must be writeable by PHP process, and not in the web server document root
|
// Must be writeable by PHP process, and not in the web server document root
|
||||||
$config['enigma_pgp_homedir'] = '__DIR__';
|
$config['enigma_pgp_homedir'] = '__FINALPATH__/plugins/enigma/home';
|
||||||
|
|
||||||
// Location of gpg binary. By default it will be auto-detected.
|
// Location of gpg binary. By default it will be auto-detected.
|
||||||
// This is also a way to force gpg2 use if there are both 1.x and 2.x on the system.
|
// This is also a way to force gpg2 use if there are both 1.x and 2.x on the system.
|
||||||
|
|
6
doc/DESCRIPTION.md
Normal file
6
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Roundcube is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching and spell checking.
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- CardDAV to connect with baïkal or Nextcloud
|
||||||
|
- Support for PGP encryption with Enigma plugin
|
1
doc/DESCRIPTION_fr.md
Normal file
1
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Roundcube est un client IMAP multilingue basé sur un navigateur avec une interface utilisateur semblable à une application.
|
53
doc/DISCLAIMER.md
Normal file
53
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
You can extend - or even override - the Roundcube configuration which is coming with this package in the file `conf/local.inc.php`. Do not edit the file `conf/config.inc.php` as future upgrades will overwrite it.
|
||||||
|
|
||||||
|
## YunoHost specific features
|
||||||
|
|
||||||
|
In addition to Roundcube core features, the following are made available with this package:
|
||||||
|
|
||||||
|
* Synchronize your email aliases as identities in Roundcube
|
||||||
|
* Install the [contextmenu](https://plugins.roundcube.net/packages/johndoh/contextmenu) and [automatic addressbook](https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook) plugins by default
|
||||||
|
* Allow to install the [CardDAV](https://plugins.roundcube.net/packages/roundcube/carddav) (address book) synchronization plugin at the installation - note that if you have installed Nextcloud or Baïkal, it will automatically add the corresponding and existing address book.
|
||||||
|
* Support for PGP encryption with Enigma plugin by default.
|
||||||
|
|
||||||
|
#### Multi-users support
|
||||||
|
|
||||||
|
* Integrate with YunoHost users and SSO - i.e logout button, YunoHost users search
|
||||||
|
|
||||||
|
#### Plugins
|
||||||
|
|
||||||
|
You can also install other plugins - which will not be removed with upgrades. To do so, you can use the official [Plugin Repository](https://plugins.roundcube.net/).
|
||||||
|
|
||||||
|
##### From the Plugin Repository
|
||||||
|
|
||||||
|
Let's say for example that we want to install the [html5_notifier](https://plugins.roundcube.net/packages/kitist/html5_notifier) plugin.
|
||||||
|
|
||||||
|
1. Connect to your server as root using SSH:
|
||||||
|
```
|
||||||
|
$ ssh admin@1.2.3.4
|
||||||
|
$ sudo -i
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Log in as the `roundcube` user - which owns the roundcube directory - and navigate in it:
|
||||||
|
```
|
||||||
|
# su -s /bin/bash - roundcube
|
||||||
|
$ cd /var/www/roundcube
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Install the plugin you want using composer - note that you have to specify *kitist/html5_notifier* and not only *html5_notifier*:
|
||||||
|
```
|
||||||
|
$ COMPOSER_HOME=./.composer php composer.phar require "kitist/html5_notifier"
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Enable it in the local configuration file `conf/local.inc.php` using your favorite text editor by adding:
|
||||||
|
```
|
||||||
|
<?php
|
||||||
|
$config['plugins'][] = 'html5_notifier';
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that you should also check the plugin homepage for additional installation steps as needed.
|
||||||
|
|
||||||
|
##### Manual installation
|
||||||
|
|
||||||
|
You can also download the plugin and put it under the `plugins/` directory. In this case, do not forget to change ownerships of this folder to `roundcube`.
|
54
doc/DISCLAIMER_fr.md
Normal file
54
doc/DISCLAIMER_fr.md
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Vous pouvez étendre (ou même remplacer) la configuration de Roundcube fournie avec ce paquet dans le fichier `conf/local.inc.php`. Ne modifiez pas le fichier `conf/config.inc.php` car les futures mises à jour le remplaceront.
|
||||||
|
|
||||||
|
## Caractéristiques spécifiques YunoHost
|
||||||
|
|
||||||
|
En plus des fonctionnalités principales de Roundcube, les éléments suivants sont disponibles avec ce paquet :
|
||||||
|
|
||||||
|
* Synchronisez vos alias de messagerie en tant qu'identités dans Roundcube.
|
||||||
|
* Installation des plugins [contextmenu](https://plugins.roundcube.net/packages/johndoh/contextmenu)
|
||||||
|
et [automatic addressbook](https://plugins.roundcube.net/packages/sblaisot/automatic_addressbook) par default.
|
||||||
|
* Permettre d'installer [CardDAV](https://plugins.roundcube.net/packages/roundcube/carddav) (carnet d'adresses) de synchronisation à l'installation - notez que si vous avez installé Nextcloud ou Baïkal, il ajoutera automatiquement le carnet d'adresses correspondant.
|
||||||
|
* Prise en charge du cryptage PGP avec le plugin Enigma installé par default.
|
||||||
|
|
||||||
|
#### Support multi-utilisateur
|
||||||
|
|
||||||
|
* Intégration avec les utilisateurs YunoHost et SSO - c'est-à-dire le bouton de déconnexion, reconnaissance des autres utilisateurs de l'instance YunoHost.
|
||||||
|
|
||||||
|
#### Plugins
|
||||||
|
|
||||||
|
Vous pouvez également installer d'autres plugins (qui ne seront pas supprimés avec les mises à niveau). Pour cela, vous pouvez utiliser le [Plugin Repository](https://plugins.roundcube.net/) officiel.
|
||||||
|
|
||||||
|
##### Depuis le dépôt de plugins
|
||||||
|
|
||||||
|
Si, par exemple, vous voulez installer le plugin [html5_notifier](https://plugins.roundcube.net/packages/kitist/html5_notifier).
|
||||||
|
|
||||||
|
1. Connectez-vous en SSH à votre serveur en tant que root :
|
||||||
|
```
|
||||||
|
$ ssh admin@1.2.3.4
|
||||||
|
$ sudo -i
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Connectez-vous en tant qu'utilisateur `roundcube` (qui possède le répertoire roundcube) et naviguez dedans :
|
||||||
|
```
|
||||||
|
# su -s /bin/bash - roundcube
|
||||||
|
$ cd /var/www/roundcube
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Installez le plugin que vous voulez en utilisant Composer - notez que vous devez spécifier *kitist/html5_notifier* et pas seulement *html5_notifier* :
|
||||||
|
```
|
||||||
|
$ COMPOSER_HOME=./.composer php composer.phar require "kitist/html5_notifier"
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Activez-le dans le fichier de configuration local `conf/local.inc.php` en ajoutant :
|
||||||
|
```
|
||||||
|
<?php
|
||||||
|
$config['plugins'][] = 'html5_notifier';
|
||||||
|
```
|
||||||
|
|
||||||
|
Notez que vous devez également consulter la page d'accueil du plugin pour connaître les étapes d'installation supplémentaires si nécessaire.
|
||||||
|
|
||||||
|
##### Installation manual
|
||||||
|
|
||||||
|
Vous pouvez également télécharger le plugin et le placer dans le répertoire `plugins /`. Dans ce cas, n'oubliez pas de changer la propriété de ce dossier en `roundcube`.
|
|
@ -6,40 +6,38 @@
|
||||||
"en": "Open Source Webmail software",
|
"en": "Open Source Webmail software",
|
||||||
"fr": "Webmail Open Source"
|
"fr": "Webmail Open Source"
|
||||||
},
|
},
|
||||||
"version": "1.4.11~ynh2",
|
"version": "1.5.0~ynh1",
|
||||||
"url": "https://roundcube.net/",
|
"url": "https://roundcube.net/",
|
||||||
|
"upstream": {
|
||||||
|
"license": "GPL-3.0-only",
|
||||||
|
"website": "https://roundcube.net/",
|
||||||
|
"demo": "https://demo.yunohost.org/webmail/",
|
||||||
|
"admindoc": "https://github.com/roundcube/roundcubemail/wiki",
|
||||||
|
"code": "https://github.com/roundcube/roundcubemail"
|
||||||
|
},
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "",
|
"name": "",
|
||||||
"email": ""
|
"email": ""
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.0.7"
|
"yunohost": ">= 4.2.4"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php7.0-fpm",
|
"php7.3-fpm",
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install" : [
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain"
|
||||||
"ask": {
|
|
||||||
"en": "Choose a domain for Roundcube",
|
|
||||||
"fr": "Choisissez un domaine pour Roundcube"
|
|
||||||
},
|
|
||||||
"example": "domain.org"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a path for Roundcube",
|
|
||||||
"fr": "Choisissez un chemin pour Roundcube"
|
|
||||||
},
|
|
||||||
"example": "/webmail",
|
"example": "/webmail",
|
||||||
"default": "/webmail"
|
"default": "/webmail"
|
||||||
},
|
},
|
||||||
|
@ -50,7 +48,7 @@
|
||||||
"en": "Choose the application language",
|
"en": "Choose the application language",
|
||||||
"fr": "Choisissez la langue de l'application"
|
"fr": "Choisissez la langue de l'application"
|
||||||
},
|
},
|
||||||
"choices": ["fr_FR", "en_GB", "de_DE"],
|
"choices": ["de_DE", "en_GB", "fr_FR", "it_IT"],
|
||||||
"default": "en_GB"
|
"default": "en_GB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -61,15 +59,6 @@
|
||||||
"fr": "Installer le plugin de synchronisation CardDAV ?"
|
"fr": "Installer le plugin de synchronisation CardDAV ?"
|
||||||
},
|
},
|
||||||
"default": false
|
"default": false
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "with_enigma",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Install Enigma messages encryption plugin?",
|
|
||||||
"fr": "Installer le plugin de chiffrement des messages Enigma ?"
|
|
||||||
},
|
|
||||||
"default": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,74 +10,13 @@ YNH_PHP_VERSION="7.3"
|
||||||
extra_php_dependencies="php-pear php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-curl"
|
extra_php_dependencies="php-pear php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-curl"
|
||||||
|
|
||||||
# Composer version
|
# Composer version
|
||||||
composer_version=1.10.17
|
YNH_COMPOSER_VERSION=2.1.1
|
||||||
|
|
||||||
# Plugins version
|
# Plugins version
|
||||||
contextmenu_version=2.3
|
contextmenu_version=3.2.1
|
||||||
automatic_addressbook_version=v0.4.3
|
automatic_addressbook_version=v0.4.3
|
||||||
carddav_version=3.0.3
|
carddav_version=3.0.3
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
readonly YNH_DEFAULT_COMPOSER_VERSION=1.10.17
|
|
||||||
# Declare the actual composer version to use.
|
|
||||||
# A packager willing to use another version of composer can override the variable into its _common.sh.
|
|
||||||
YNH_COMPOSER_VERSION=${YNH_COMPOSER_VERSION:-$YNH_DEFAULT_COMPOSER_VERSION}
|
|
||||||
|
|
||||||
# Execute a command with Composer
|
|
||||||
#
|
|
||||||
# usage: ynh_composer_exec [--phpversion=phpversion] [--workdir=$final_path] --commands="commands"
|
|
||||||
# | arg: -v, --phpversion - PHP version to use with composer
|
|
||||||
# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path.
|
|
||||||
# | arg: -c, --commands - Commands to execute.
|
|
||||||
ynh_composer_exec () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
local legacy_args=vwc
|
|
||||||
declare -Ar args_array=( [v]=phpversion= [w]=workdir= [c]=commands= )
|
|
||||||
local phpversion
|
|
||||||
local workdir
|
|
||||||
local commands
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
workdir="${workdir:-$final_path}"
|
|
||||||
phpversion="${phpversion:-$YNH_PHP_VERSION}"
|
|
||||||
|
|
||||||
COMPOSER_HOME="$workdir/.composer" \
|
|
||||||
php${phpversion} "$workdir/composer.phar" $commands \
|
|
||||||
-d "$workdir" --quiet --no-interaction
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install and initialize Composer in the given directory
|
|
||||||
#
|
|
||||||
# usage: ynh_install_composer [--phpversion=phpversion] [--workdir=$final_path] [--install_args="--optimize-autoloader"] [--composerversion=composerversion]
|
|
||||||
# | arg: -v, --phpversion - PHP version to use with composer
|
|
||||||
# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path.
|
|
||||||
# | arg: -a, --install_args - Additional arguments provided to the composer install. Argument --no-dev already include
|
|
||||||
# | arg: -c, --composerversion - Composer version to install
|
|
||||||
ynh_install_composer () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
local legacy_args=vwa
|
|
||||||
declare -Ar args_array=( [v]=phpversion= [w]=workdir= [a]=install_args= [c]=composerversion=)
|
|
||||||
local phpversion
|
|
||||||
local workdir
|
|
||||||
local install_args
|
|
||||||
local composerversion
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
workdir="${workdir:-$final_path}"
|
|
||||||
phpversion="${phpversion:-$YNH_PHP_VERSION}"
|
|
||||||
install_args="${install_args:-}"
|
|
||||||
composerversion="${composerversion:-$YNH_COMPOSER_VERSION}"
|
|
||||||
|
|
||||||
curl -sS https://getcomposer.org/installer \
|
|
||||||
| COMPOSER_HOME="$workdir/.composer" \
|
|
||||||
php${phpversion} -- --quiet --install-dir="$workdir" --version=$composerversion \
|
|
||||||
|| ynh_die "Unable to install Composer."
|
|
||||||
|
|
||||||
# update dependencies to create composer.lock
|
|
||||||
ynh_composer_exec --phpversion="${phpversion}" --workdir="$workdir" --commands="install --no-dev $install_args" \
|
|
||||||
|| ynh_die "Unable to update core dependencies with Composer."
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$YNH_PHP_VERSION
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||||
|
|
|
@ -30,6 +30,23 @@ ynh_script_progression --message="Loading installation settings..." --weight=2
|
||||||
# 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)
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
|
||||||
|
|
||||||
|
# Backup the current version of the app
|
||||||
|
ynh_backup_before_upgrade
|
||||||
|
ynh_clean_setup () {
|
||||||
|
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
|
||||||
|
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||||
|
|
||||||
|
# Restore it if the upgrade fails
|
||||||
|
ynh_restore_upgradebackup
|
||||||
|
}
|
||||||
|
# Exit if an error occurs during the execution of the script
|
||||||
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK WHICH PARTS SHOULD BE CHANGED
|
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -23,7 +23,6 @@ ynh_abort_if_errors
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
with_carddav=$YNH_APP_ARG_WITH_CARDDAV
|
with_carddav=$YNH_APP_ARG_WITH_CARDDAV
|
||||||
with_enigma=$YNH_APP_ARG_WITH_ENIGMA
|
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
language=$YNH_APP_ARG_LANGUAGE
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
@ -47,7 +46,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav
|
ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav
|
||||||
ynh_app_setting_set --app=$app --key=with_enigma --value=$with_enigma
|
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -55,12 +53,21 @@ ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating a MySQL database..."
|
ynh_script_progression --message="Creating a MySQL database..." --weight=2
|
||||||
|
|
||||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
|
db_user=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
|
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATE DEDICATED USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring system user..." --weight=3
|
||||||
|
|
||||||
|
# Create a system user
|
||||||
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -70,6 +77,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -78,14 +89,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring system user..." --weight=3
|
|
||||||
|
|
||||||
# Create a system user
|
|
||||||
ynh_system_user_create --username=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -119,17 +122,10 @@ ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE ROUNDCUBE
|
# CONFIGURE ROUNDCUBE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Roundcube..."
|
ynh_script_progression --message="Configuring Roundcube..." --weight=2
|
||||||
|
|
||||||
rc_conf="$final_path/config/config.inc.php"
|
deskey=$(ynh_string_random --length=24)
|
||||||
|
ynh_add_config --template="../conf/config.inc.php" --destination="$final_path/config/config.inc.php"
|
||||||
cp ../conf/config.inc.php "$rc_conf"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DESKEY__" --replace_string="$(ynh_string_random --length=24)" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_name" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DBPASS__" --replace_string="$db_pwd" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$rc_conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL ADDITIONAL PLUGINS
|
# INSTALL ADDITIONAL PLUGINS
|
||||||
|
@ -151,6 +147,10 @@ ynh_composer_exec --commands="require \
|
||||||
|
|
||||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
||||||
|
|
||||||
|
ynh_add_config --template="../conf/enigma.config.inc.php" --destination="$final_path/plugins/enigma/config.inc.php"
|
||||||
|
mkdir -p "$final_path/plugins/enigma/home"
|
||||||
|
chown -R $app:www-data "$final_path/plugins/enigma/home"
|
||||||
|
|
||||||
# Install CardDAV plugin
|
# Install CardDAV plugin
|
||||||
if [ $with_carddav -eq 1 ]
|
if [ $with_carddav -eq 1 ]
|
||||||
then
|
then
|
||||||
|
@ -180,50 +180,32 @@ then
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# Do not actualy add the carddav plugin if there's no carddav server available...
|
# Do not actualy add the cardDAV plugin if there's no cardDAV server available...
|
||||||
if [ $carddav_server -eq 1 ]
|
if [ $carddav_server -eq 1 ]
|
||||||
then
|
then
|
||||||
installed_plugins+=" 'carddav',"
|
installed_plugins+=" 'carddav',"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Enigma plugin
|
|
||||||
if [ $with_enigma -eq 1 ]
|
|
||||||
then
|
|
||||||
enigma_tmp_config="../conf/enigma.config.inc.php"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DIR__" --replace_string="$final_path/plugins/enigma/home" --target_file="$enigma_tmp_config"
|
|
||||||
|
|
||||||
cp "$enigma_tmp_config" "$final_path/plugins/enigma/config.inc.php" \
|
|
||||||
&& installed_plugins+=" 'enigma'," \
|
|
||||||
|| ynh_print_warn --message="Unable to install Enigma plugin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE ROUNDCUBE CONFIGURATION
|
# UPDATE ROUNDCUBE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating Roundcube configuration..." --weight=3
|
ynh_script_progression --message="Updating Roundcube configuration..." --weight=3
|
||||||
|
|
||||||
ynh_replace_string --match_string="^\s*// installed plugins" --replace_string="&\n $installed_plugins" --target_file="$rc_conf"
|
ynh_replace_string --match_string="^\s*// installed plugins" --replace_string="&\n $installed_plugins" --target_file="$final_path/config/config.inc.php"
|
||||||
|
|
||||||
# Update javascript dependencies
|
# Update javascript dependencies
|
||||||
(cd "$final_path"
|
(cd "$final_path"
|
||||||
/usr/bin/php -q ./bin/install-jsdeps.sh)
|
/usr/bin/php$phpversion -q ./bin/install-jsdeps.sh)
|
||||||
|
|
||||||
# Store the config file checksum into the app settings
|
# Store the config file checksum into the app settings
|
||||||
ynh_store_file_checksum --file="$rc_conf"
|
ynh_store_file_checksum --file="$final_path/config/config.inc.php"
|
||||||
|
|
||||||
|
chmod 400 "$final_path/config/config.inc.php"
|
||||||
|
chown $app:$app "$final_path/config/config.inc.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set permissions to app files
|
|
||||||
chown -R root: "$final_path"
|
|
||||||
mkdir -p "$final_path/plugins/enigma/home"
|
|
||||||
chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading installation settings..."
|
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading settings..."
|
ynh_script_progression --message="Loading settings..." --weight=1
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
db_user=$db_name
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -34,8 +35,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..." --weight=3
|
ynh_script_progression --message="Validating restoration parameters..." --weight=3
|
||||||
|
|
||||||
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 "
|
||||||
|
|
||||||
|
@ -47,29 +46,24 @@ test ! -d $final_path \
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE APP MAIN DIR
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring $app main directory..."
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=4
|
ynh_script_progression --message="Recreating the dedicated system user..." --weight=4
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
# Create the dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE USER RIGHTS
|
# RESTORE THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring $app main directory..." --weight=4
|
||||||
|
|
||||||
# Restore permissions on app files
|
ynh_restore_file --origin_path="$final_path"
|
||||||
chown -R root: "$final_path"
|
|
||||||
mkdir -p "$final_path/plugins/enigma/home"
|
chmod 750 "$final_path"
|
||||||
chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
|
@ -95,7 +89,7 @@ ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX AND PHP-FPM
|
# RELOAD NGINX AND PHP-FPM
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
|
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload
|
ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
127
scripts/upgrade
127
scripts/upgrade
|
@ -20,10 +20,11 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
db_user=$db_name
|
||||||
with_carddav=$(ynh_app_setting_get --app=$app --key=with_carddav)
|
with_carddav=$(ynh_app_setting_get --app=$app --key=with_carddav)
|
||||||
with_enigma=$(ynh_app_setting_get --app=$app --key=with_enigma)
|
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||||
|
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -31,10 +32,24 @@ language=$(ynh_app_setting_get --app=$app --key=language)
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=5
|
||||||
|
|
||||||
|
# Backup the current version of the app
|
||||||
|
ynh_backup_before_upgrade
|
||||||
|
ynh_clean_setup () {
|
||||||
|
# restore it if the upgrade fails
|
||||||
|
ynh_restore_upgradebackup
|
||||||
|
}
|
||||||
|
# Exit if an error occurs during the execution of the script
|
||||||
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
# If db_name doesn't exist, create it
|
# If db_name doesn't exist, create it
|
||||||
if [ -z "$db_name" ]; then
|
if [ -z "$db_name" ]; then
|
||||||
|
@ -59,36 +74,26 @@ if [ -z "$with_carddav" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav
|
ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If with_enigma doesn't exist, create it
|
|
||||||
if [ -z "$with_enigma" ]; then
|
|
||||||
if [ -f "${final_path}/plugins/enigma/config.inc.php" ]
|
|
||||||
then
|
|
||||||
with_enigma=1
|
|
||||||
else
|
|
||||||
with_enigma=0
|
|
||||||
fi
|
|
||||||
ynh_app_setting_set --app=$app --key=with_enigma --value=$with_enigma
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If language doesn't exist, create it
|
# If language doesn't exist, create it
|
||||||
if [ -z "$language" ]; then
|
if [ -z "$language" ]; then
|
||||||
language="en_GB"
|
language="en_GB"
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
# Cleaning legacy permissions
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
if ynh_legacy_permissions_exists; then
|
||||||
#=================================================
|
ynh_legacy_permissions_delete_all
|
||||||
ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=30
|
|
||||||
|
|
||||||
# Backup the current version of the app
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
ynh_backup_before_upgrade
|
fi
|
||||||
ynh_clean_setup () {
|
|
||||||
# restore it if the upgrade fails
|
#=================================================
|
||||||
ynh_restore_upgradebackup
|
# CREATE DEDICATED USER
|
||||||
}
|
#=================================================
|
||||||
# Exit if an error occurs during the execution of the script
|
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||||
ynh_abort_if_errors
|
|
||||||
|
# Create a dedicated user (if not existing)
|
||||||
|
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
@ -107,22 +112,18 @@ then
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
|
||||||
ynh_system_user_create --username=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -139,21 +140,10 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Reconfiguring Roundcube..."
|
ynh_script_progression --message="Reconfiguring Roundcube..." --weight=1
|
||||||
|
|
||||||
rc_conf="$final_path/config/config.inc.php"
|
deskey=$(ynh_string_random --length=24)
|
||||||
|
ynh_add_config --template="../conf/config.inc.php" --destination="$final_path/config/config.inc.php"
|
||||||
# Verify the checksum and backup the file if it's different
|
|
||||||
ynh_backup_if_checksum_is_different "$rc_conf"
|
|
||||||
|
|
||||||
cp ../conf/config.inc.php "$rc_conf"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DESKEY__" --replace_string="$(ynh_string_random --length=24)" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DBUSER__" --replace_string=$db_name --target_file="$rc_conf"
|
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
|
||||||
ynh_replace_string --match_string="__DBPASS__" --replace_string="$db_pwd" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$rc_conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE DEPENDENCIES WITH COMPOSER
|
# UPDATE DEPENDENCIES WITH COMPOSER
|
||||||
|
@ -166,11 +156,12 @@ then
|
||||||
# Check if dependencies need to be updated with Composer
|
# Check if dependencies need to be updated with Composer
|
||||||
if [ -f "$final_path/composer.json" ]
|
if [ -f "$final_path/composer.json" ]
|
||||||
then
|
then
|
||||||
ynh_exec_warn_less ynh_composer_exec --commands=\"update --no-dev --prefer-dist\"
|
ynh_exec_warn_less ynh_composer_exec --commands="update"
|
||||||
else
|
else
|
||||||
# Install composer.json
|
# Install composer.json
|
||||||
cp "$final_path/composer.json-dist" "$final_path/composer.json"
|
cp "$final_path/composer.json-dist" "$final_path/composer.json"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE ADDITIONAL PLUGINS
|
# UPGRADE ADDITIONAL PLUGINS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -191,6 +182,10 @@ then
|
||||||
|
|
||||||
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
installed_plugins+=" 'contextmenu', 'automatic_addressbook',"
|
||||||
|
|
||||||
|
ynh_add_config --template="../conf/enigma.config.inc.php" --destination="$final_path/plugins/enigma/config.inc.php"
|
||||||
|
mkdir -p "$final_path/plugins/enigma/home"
|
||||||
|
chown -R $app:$app "$final_path/plugins/enigma/home"
|
||||||
|
|
||||||
# Update or install CardDAV plugin
|
# Update or install CardDAV plugin
|
||||||
if [ $with_carddav -eq 1 ]
|
if [ $with_carddav -eq 1 ]
|
||||||
then
|
then
|
||||||
|
@ -227,31 +222,22 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Enigma plugin
|
|
||||||
if [ $with_enigma -eq 1 ]
|
|
||||||
then
|
|
||||||
enigma_tmp_config="../conf/enigma.config.inc.php"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DIR__" --replace_string="$final_path/plugins/enigma/home" --target_file="$enigma_tmp_config"
|
|
||||||
|
|
||||||
cp "$enigma_tmp_config" "$final_path/plugins/enigma/config.inc.php" \
|
|
||||||
&& installed_plugins+=" 'enigma'," \
|
|
||||||
|| ynh_print_warn --message="Unable to install Enigma plugin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE ROUNDCUBE CONFIGURATION
|
# UPDATE ROUNDCUBE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating $app configuration..." --weight=4
|
ynh_script_progression --message="Updating $app configuration..." --weight=4
|
||||||
|
|
||||||
ynh_replace_string --match_string="^\s*// installed plugins" --replace_string="&\n $installed_plugins" --target_file="$rc_conf"
|
ynh_replace_string --match_string="^\s*// installed plugins" --replace_string="&\n $installed_plugins" --target_file="$final_path/config/config.inc.php"
|
||||||
|
|
||||||
# Update JavaScript dependencies
|
# Update JavaScript dependencies
|
||||||
(cd "$final_path"
|
(cd "$final_path"
|
||||||
/usr/bin/php -q ./bin/install-jsdeps.sh)
|
/usr/bin/php$phpversion -q ./bin/install-jsdeps.sh)
|
||||||
|
|
||||||
# Store the config file checksum into the app settings
|
# Store the config file checksum into the app settings
|
||||||
ynh_store_file_checksum --file="$rc_conf"
|
ynh_store_file_checksum --file="$final_path/config/config.inc.php"
|
||||||
|
|
||||||
|
chmod 400 "$final_path/config/config.inc.php"
|
||||||
|
chown $app:$app "$final_path/config/config.inc.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE ROUNDCUBE CORE
|
# UPDATE ROUNDCUBE CORE
|
||||||
|
@ -262,21 +248,10 @@ then
|
||||||
ynh_exec_warn ./bin/update.sh --version=$oldversion -y)
|
ynh_exec_warn ./bin/update.sh --version=$oldversion -y)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set permissions to app files
|
|
||||||
chown -R root: "$final_path"
|
|
||||||
mkdir -p "$final_path/plugins/enigma/home"
|
|
||||||
chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server..."
|
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue