forked from YunoHost-Apps/rainloop_ynh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- use localhost for ynh domain config (thanks n00dl3)
- update README
- Loading branch information
Showing
4 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 "[email protected]@$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 | ||
|
||
|