From cef267246842f0550ce3ed829193812d34c09470 Mon Sep 17 00:00:00 2001 From: Djip007 Date: Thu, 19 Nov 2015 20:37:30 +0100 Subject: [PATCH] - use localhost for ynh domain config (thanks n00dl3) - update README --- README.md | 6 +++--- conf/data/domains/domain.tld.ini | 4 ++-- manifest.json | 4 ++-- scripts/install | 12 ++++++++---- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6290e75..7540265 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Rainloop for YunoHost -* [rainloop](http://rainloop.net/ ) +* [rainloop](http://rainloop.net/ ): 1.9.3.365 ## English Rainloop is a lightweight webmail. @@ -16,7 +16,7 @@ https://DOMAIN.TLD/baikal/card.php/addressbooks/USER/default/ - 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/polytan02/rainloop_ynh rainloop`` +``sudo yunohost app upgrade -u https://github.com/YunoHostPlugins-Testing/rainloop_ynh rainloop`` ## Français @@ -34,5 +34,5 @@ https://DOMAIN.TLD/baikal/card.php/addressbooks/UTILISATEUR/default/ - 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/polytan02/rainloop_ynh rainloop`` +``sudo yunohost app upgrade -u https://github.com/YunoHostPlugins-Testing/rainloop_ynh rainloop`` diff --git a/conf/data/domains/domain.tld.ini b/conf/data/domains/domain.tld.ini index df07f61..954108c 100644 --- a/conf/data/domains/domain.tld.ini +++ b/conf/data/domains/domain.tld.ini @@ -1,4 +1,4 @@ -imap_host = "domain.tld" +imap_host = "localhost" imap_port = 993 imap_secure = "SSL" imap_short_login = On @@ -7,7 +7,7 @@ sieve_allow_raw = Off sieve_host = "" sieve_port = 4190 sieve_secure = "None" -smtp_host = "domain.tld" +smtp_host = "localhost" smtp_port = 465 smtp_secure = "SSL" smtp_short_login = On diff --git a/manifest.json b/manifest.json index e184a63..a44d6d7 100644 --- a/manifest.json +++ b/manifest.json @@ -7,8 +7,8 @@ }, "url": "http://rainloop.net/", "maintainer": { - "name": "polytan02", - "email": "polytan02@mcgva.org" + "name": "scith, Djip007", + "email": "none@domaine.org" }, "multi_instance": "false", "arguments": { diff --git a/scripts/install b/scripts/install index c8c0b5a..63963d3 100644 --- a/scripts/install +++ b/scripts/install @@ -23,15 +23,20 @@ app=rainloop exit 1 fi -# Generate random password, use 'rainloop' as database name and user and intialize databse +# Generate random password db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p') + +# Use 'rainloop' as database name and user db_user=$app + +# Initialize database and store mysql password for upgrade sudo yunohost app initdb $db_user -p $db_pwd sudo yunohost app setting $app mysqlpwd -v $db_pwd # Create the final path and copy sources final_path=/var/www/$app rainloop_path=${final_path}/app + #rainloop_path=${final_path} sudo rm -rf $final_path sudo mkdir -p $final_path @@ -80,9 +85,8 @@ app=rainloop # get list of ldap domains alldomains=`ldapsearch -LLL -x -b ou=domains,dc=yunohost,dc=org -s one "objectclass=top" virtualdomain | grep -v "dn:" | sed "s/virtualdomain://" ` - for alldomain in $alldomains ; do - sudo cp ../conf/data/domains/domain.tld.ini $rainloop_path/data/_data_/_default_/domains/$alldomain.ini - sudo sed -i "s@domain.tld@$alldomain@g" $rainloop_path/data/_data_/_default_/domains/$alldomain.ini + for domain in $alldomains ; do + sudo cp ../conf/data/domains/domain.tld.ini $rainloop_path/data/_data_/_default_/domains/$domain.ini done sudo cp ../conf/data/domains/disabled $rainloop_path/data/_data_/_default_/domains/disabled