mirror of
https://github.com/YunoHost-Apps/rainloop_ynh.git
synced 2024-09-03 20:16:18 +02:00
Normalization from example_ynh
This commit is contained in:
parent
09c5f5ff54
commit
0664ec55c9
10 changed files with 110 additions and 83 deletions
72
README.md
72
README.md
|
@ -1,11 +1,31 @@
|
|||
# Rainloop for YunoHost
|
||||
|
||||
* [rainloop](http://rainloop.net/ ): 1.11.3
|
||||
[![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)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allow you to install Rainloop 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.*
|
||||
|
||||
## Overview
|
||||
|
||||
## English
|
||||
Rainloop is a lightweight webmail.
|
||||
|
||||
To configure it, go to http://DOMAIN.TLD/rainloop/app/?admin
|
||||
**Shipped version:** 1.11.3
|
||||
|
||||
## Screenshots
|
||||
|
||||
![](https://www.rainloop.net/static/media/screenshots/v2/12.png)
|
||||
|
||||
## Demo
|
||||
|
||||
* [YunoHost demo](https://demo.yunohost.org/rainloop/app/)
|
||||
* [Official demo](https://mail.rainloop.net/)
|
||||
|
||||
## Configuration
|
||||
|
||||
Go to http://DOMAIN.TLD/rainloop/app/?admin
|
||||
|
||||
- The default login is : admin
|
||||
- The default password is : Password chosen during install
|
||||
|
@ -16,28 +36,44 @@ 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
|
||||
|
||||
Rainloop saves your PGP private keys in the browser storage. This means that you will loose your private keys if you clear your browser storage (e.g., private browsing, different computer...). This packages integrates [PGPback by chtixof](https://github.com/chtixof/pgpback_ynh) so you can store your PGP private keys on the server securely. Go to **http://DOMAIN.TLD/rainloop/pgpback** to backup your PGP keys on the server or restore them.
|
||||
## Documentation
|
||||
|
||||
To upgrade the app once a new rainloop version is available, simply run in a local shell via ssh or otherwise :
|
||||
``sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/rainloop_ynh rainloop``
|
||||
* Official documentation: https://www.rainloop.net/docs/configuration/
|
||||
* YunoHost documentation: https://yunohost.org/#/app_rainloop
|
||||
|
||||
## YunoHost specific features
|
||||
|
||||
## Français
|
||||
Rainloop est un webmail simple et léger.
|
||||
#### Multi-users support
|
||||
|
||||
Pour le configurer après l'installation, veuillez vous rendre sur http://DOMAIN.TLD/rainloop/app/?admin
|
||||
#### Supported architectures
|
||||
|
||||
- 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 settings rainloop password``
|
||||
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Official%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/)
|
||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Official%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%28Official%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/)
|
||||
|
||||
Chaque utilisateur peut ajouter un carnet d'adresse distant CardDav via leurs propres paramètres.
|
||||
## Limitations
|
||||
|
||||
- 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
|
||||
## Additional information
|
||||
|
||||
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 saves your PGP private keys in the browser storage. This means that you will loose your private keys if you clear your browser storage (e.g., private browsing, different computer...). This packages integrates [PGPback by chtixof](https://github.com/chtixof/pgpback_ynh) so you can store your PGP private keys on the server securely. Go to **http://DOMAIN.TLD/rainloop/pgpback** to backup your PGP keys on the server or restore them.
|
||||
|
||||
Pour mettre à jour rainloop lorsqu'une nouvelle version est disponible, lancez en console locale (ssh ou autre) :
|
||||
``sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/rainloop_ynh rainloop``
|
||||
## Links
|
||||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/rainloop_ynh/issues
|
||||
* Rainloop website: https://www.rainloop.net/
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
---
|
||||
|
||||
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.
|
||||
```
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade rainloop -u https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug
|
||||
```
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
;; Test Rainloop
|
||||
auto_remove=1
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/rainloop" (PATH)
|
||||
|
|
|
@ -17,10 +17,10 @@ allow_themes = On
|
|||
allow_user_background = Off
|
||||
|
||||
; Language used by default
|
||||
language = "LANGTOCHANGE"
|
||||
language = "__LANGTOCHANGE__"
|
||||
|
||||
; Admin Panel interface language
|
||||
language_admin = "LANGTOCHANGE"
|
||||
language_admin = "__LANGTOCHANGE__"
|
||||
|
||||
; Allow language selection on settings screen
|
||||
allow_languages_on_settings = On
|
||||
|
@ -58,9 +58,9 @@ allow_sharing = On
|
|||
allow_sync = On
|
||||
sync_interval = 20
|
||||
type = "mysql"
|
||||
pdo_dsn = "mysql:host=127.0.0.1;port=3306;dbname=MYSQLUSER"
|
||||
pdo_user = "MYSQLUSER"
|
||||
pdo_password = "MYSQLPASSWORD"
|
||||
pdo_dsn = "mysql:host=127.0.0.1;port=3306;dbname=__MYSQLUSER__"
|
||||
pdo_user = "__MYSQLUSER__"
|
||||
pdo_password = "__MYSQLPASSWORD__"
|
||||
suggestions_limit = 30
|
||||
|
||||
[security]
|
||||
|
@ -114,7 +114,7 @@ messagelist_actions = On
|
|||
attachments_actions = On
|
||||
|
||||
[login]
|
||||
default_domain = "domain.tld"
|
||||
default_domain = "__DOMAIN__"
|
||||
|
||||
; Allow language selection on webmail login screen
|
||||
allow_languages_on_login = On
|
||||
|
@ -138,7 +138,7 @@ sign_me_auto = "DefaultOff"
|
|||
enable = On
|
||||
|
||||
; List of enabled plugins
|
||||
enabled_list = "PLUGINSTOENABLE"
|
||||
enabled_list = "__PLUGINSTOENABLE__"
|
||||
|
||||
[defaults]
|
||||
; Editor mode used by default (Plain, Html, HtmlForced or PlainForced)
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
location __PATH__ {
|
||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
# Path to source
|
||||
alias __FINALPATH__/;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
@ -28,5 +32,4 @@ location __PATH__ {
|
|||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Lightweight multi-account webmail",
|
||||
"fr": "Webmail léger multi-comptes"
|
||||
},
|
||||
"version": "1.11.1",
|
||||
"version": "1.11.1~ynh2",
|
||||
"url": "https://www.rainloop.net/",
|
||||
"license": "AGPL-3.0",
|
||||
"maintainer": {
|
||||
|
@ -70,6 +70,7 @@
|
|||
},
|
||||
{
|
||||
"name": "lang",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Select default language",
|
||||
"fr": "Definir la langue par defaut"
|
||||
|
|
|
@ -6,12 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
if [ ! -e _common.sh ]; then
|
||||
# Get the _common.sh file if it's not in the current directory
|
||||
cp ../settings/scripts/_common.sh ./_common.sh
|
||||
chmod a+rx _common.sh
|
||||
fi
|
||||
source _common.sh
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -39,8 +39,6 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
|||
# Normalize the url path syntax
|
||||
path_url=$(ynh_normalize_url_path $path_url)
|
||||
|
||||
# Check web path availability
|
||||
ynh_webpath_available $domain $path_url
|
||||
# Register (book) web path
|
||||
ynh_webpath_register $app $domain $path_url
|
||||
|
||||
|
@ -76,7 +74,6 @@ ynh_setup_source "$final_path/app"
|
|||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string "__PATH__/" "${path_url%/}/" "../conf/nginx.conf"
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
|
@ -111,32 +108,33 @@ case "$lang" in
|
|||
*)
|
||||
lang="en"
|
||||
esac
|
||||
ynh_app_setting_set "$app" lang "$lang"
|
||||
ynh_app_setting_set $app lang $lang
|
||||
|
||||
# Set plugins
|
||||
plugins="ynh-login-mapping,auto-domain-grab" # This plugin is trying to automatically grab unknown domains if users want to add external email accounts
|
||||
# This plugin is trying to automatically grab unknown domains if users want to add external email accounts
|
||||
plugins="ynh-login-mapping,auto-domain-grab"
|
||||
if [ $ldap -eq 1 ]
|
||||
then
|
||||
plugins="$plugins,ynh-ldap-suggestions" # This plugin is to suggest YunoHost users in recipients list
|
||||
# This plugin is to suggest YunoHost users in recipients list
|
||||
plugins="$plugins,ynh-ldap-suggestions"
|
||||
fi
|
||||
ynh_app_setting_set "$app" plugins "$plugins"
|
||||
ynh_app_setting_set $app plugins "$plugins"
|
||||
|
||||
|
||||
mkdir -p "$final_path/app/data/_data_/_default_/configs/"
|
||||
application_file="$final_path/app/data/_data_/_default_/configs/application.ini"
|
||||
|
||||
sudo cp ../conf/data/configs/application.ini "$application_file"
|
||||
ynh_replace_string "domain.tld" "$domain" "$application_file"
|
||||
ynh_replace_string "MYSQLUSER" "$db_name" "$application_file"
|
||||
ynh_replace_string "MYSQLPASSWORD" "$db_pwd" "$application_file"
|
||||
ynh_replace_string "LANGTOCHANGE" "$lang" "$application_file"
|
||||
ynh_replace_string "PLUGINSTOENABLE" "$plugins" "$application_file"
|
||||
cp ../conf/data/configs/application.ini "$application_file"
|
||||
ynh_replace_string "__DOMAIN__" $domain "$application_file"
|
||||
ynh_replace_string "__MYSQLUSER__" $db_name "$application_file"
|
||||
ynh_replace_string "__MYSQLPASSWORD__" "$db_pwd" "$application_file"
|
||||
ynh_replace_string "__LANGTOCHANGE__" $lang "$application_file"
|
||||
ynh_replace_string "__PLUGINSTOENABLE__" "$plugins" "$application_file"
|
||||
|
||||
|
||||
# Set admin password
|
||||
php ../conf/config.php --index="$final_path/app/index.php" --password="$password"
|
||||
|
||||
|
||||
# Add default domain configs by looping through all the domains already added
|
||||
mkdir -p "$final_path/app/data/_data_/_default_/domains/"
|
||||
# get list of ldap domains
|
||||
|
@ -150,12 +148,12 @@ cp ../conf/data/domains/default.ini "$final_path/app/data/_data_/_default_/domai
|
|||
|
||||
# install SSO - at the moment the index is the SSO and rainloop is installed in /app
|
||||
cp ../sources/sso/sso.php "$final_path/index.php"
|
||||
ynh_replace_string "domain.tld" "$domain" "$final_path/index.php"
|
||||
ynh_replace_string "ALIASTOCHANGE" "$final_path" "$final_path/index.php"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/index.php"
|
||||
ynh_replace_string "__ALIASTOCHANGE__" "$final_path" "$final_path/index.php"
|
||||
if [ $path_url = "/" ]; then
|
||||
ynh_replace_string "ROOTTOCHANGE" "" "$final_path/index.php"
|
||||
ynh_replace_string "__ROOTTOCHANGE__" "" "$final_path/index.php"
|
||||
else
|
||||
ynh_replace_string "ROOTTOCHANGE" "$path_url" "$final_path/index.php"
|
||||
ynh_replace_string "__ROOTTOCHANGE__" "$path_url" "$final_path/index.php"
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -6,12 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
if [ ! -e _common.sh ]; then
|
||||
# Get the _common.sh file if it's not in the current directory
|
||||
cp ../settings/scripts/_common.sh ./_common.sh
|
||||
chmod a+rx _common.sh
|
||||
fi
|
||||
source _common.sh
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -86,7 +86,7 @@ ynh_add_nginx_config
|
|||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
||||
# Create a system user
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create $app
|
||||
|
||||
#=================================================
|
||||
|
@ -104,12 +104,12 @@ ynh_add_fpm_config
|
|||
|
||||
# update SSO
|
||||
cp ../sources/sso/sso.php "$final_path/index.php"
|
||||
ynh_replace_string "domain.tld" "$domain" "$final_path/index.php"
|
||||
ynh_replace_string "ALIASTOCHANGE" "$final_path" "$final_path/index.php"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/index.php"
|
||||
ynh_replace_string "__ALIASTOCHANGE__" "$final_path" "$final_path/index.php"
|
||||
if [ $path_url = "/" ]; then
|
||||
ynh_replace_string "ROOTTOCHANGE" "" "$final_path/index.php"
|
||||
ynh_replace_string "__ROOTTOCHANGE__" "" "$final_path/index.php"
|
||||
else
|
||||
ynh_replace_string "ROOTTOCHANGE" "$path_url" "$final_path/index.php"
|
||||
ynh_replace_string "__ROOTTOCHANGE__" "$path_url" "$final_path/index.php"
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// Enable RainLoop Api and include index file
|
||||
$_ENV['RAINLOOP_INCLUDE_AS_API'] = true;
|
||||
include 'ALIASTOCHANGE/app/index.php';
|
||||
include '__ALIASTOCHANGE__/app/index.php';
|
||||
|
||||
// Retrieve email and password
|
||||
if (isset($_SERVER['HTTP_EMAIL']) && isset($_SERVER['PHP_AUTH_PW'])) {
|
||||
|
@ -11,8 +11,8 @@ if (isset($_SERVER['HTTP_EMAIL']) && isset($_SERVER['PHP_AUTH_PW'])) {
|
|||
$ssoHash = \RainLoop\Api::GetUserSsoHash($email, $password);
|
||||
|
||||
// redirect to webmail sso url
|
||||
\header('Location: https://domain.tldROOTTOCHANGE/app/index.php?sso&hash='.$ssoHash);
|
||||
\header('Location: https://__DOMAIN____ROOTTOCHANGE__/app/index.php?sso&hash='.$ssoHash);
|
||||
}
|
||||
else {
|
||||
\header('Location: https://domain.tldROOTTOCHANGE/app/index.php');
|
||||
\header('Location: https://__DOMAIN____ROOTTOCHANGE__/app/index.php');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue