1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rainloop_ynh.git synced 2024-09-03 20:16:18 +02:00

Merge pull request #22 from polytan02/master

Multi instances fix and root domain fix
This commit is contained in:
polytan02 2017-02-23 14:44:55 +00:00 committed by GitHub
commit fd67d78a91
7 changed files with 20 additions and 11 deletions

View file

@ -16,7 +16,7 @@
setup_public=1 setup_public=1
upgrade=1 upgrade=1
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=1
wrong_user=0 wrong_user=0
wrong_path=1 wrong_path=1
incorrect_path=1 incorrect_path=1
@ -42,7 +42,7 @@
setup_public=1 setup_public=1
upgrade=1 upgrade=1
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=1
wrong_user=0 wrong_user=0
wrong_path=1 wrong_path=1
incorrect_path=1 incorrect_path=1

View file

@ -1 +0,0 @@
CREATE USER 'rainloop'@'%' IDENTIFIED BY '***';GRANT ALL PRIVILEGES ON *.* TO 'rainloop'@'%' IDENTIFIED BY '***' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;CREATE DATABASE IF NOT EXISTS `rainloop`;GRANT ALL PRIVILEGES ON `rainloop`.* TO 'rainloop'@'%';GRANT ALL PRIVILEGES ON `rainloop\_%`.* TO 'rainloop'@'%';

View file

@ -58,7 +58,7 @@ allow_sharing = On
allow_sync = On allow_sync = On
sync_interval = 20 sync_interval = 20
type = "mysql" type = "mysql"
pdo_dsn = "mysql:host=127.0.0.1;port=3306;dbname=rainloop" pdo_dsn = "mysql:host=127.0.0.1;port=3306;dbname=MYSQLUSER"
pdo_user = "MYSQLUSER" pdo_user = "MYSQLUSER"
pdo_password = "MYSQLPASSWORD" pdo_password = "MYSQLPASSWORD"
suggestions_limit = 30 suggestions_limit = 30

View file

@ -5,11 +5,11 @@ location PATHTOCHANGE {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
location ^~ PATHTOCHANGE/app/data { location ^~ ROOTTOCHANGE/app/data {
deny all; deny all;
} }
location ^~ PATHTOCHANGE/pgpback/keys { location ^~ ROOTTOCHANGE/pgpback/keys {
deny all; deny all;
} }

View file

@ -9,9 +9,9 @@
"url": "http://rainloop.net/", "url": "http://rainloop.net/",
"license": "free", "license": "free",
"maintainer": { "maintainer": {
"name": "scith, Djip007" "name": "scith, Djip007, polytan02"
}, },
"multi_instance": false, "multi_instance": true,
"services": [ "services": [
"nginx", "nginx",
"php5-fpm", "php5-fpm",

View file

@ -124,6 +124,11 @@
# Install Nginx configuration file # Install Nginx configuration file
nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf
sudo cp ../conf/nginx.conf $nginx_conf_file sudo cp ../conf/nginx.conf $nginx_conf_file
if [ $path = "/" ]; then
sudo sed -i "s@ROOTTOCHANGE@@g" $nginx_conf_file
else
sudo sed -i "s@ROOTTOCHANGE@$path@g" $nginx_conf_file
fi
sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file
sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" $nginx_conf_file sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" $nginx_conf_file
sudo sed -i "s@NAMETOCHANGE@$app@g" $nginx_conf_file sudo sed -i "s@NAMETOCHANGE@$app@g" $nginx_conf_file

View file

@ -82,6 +82,11 @@
# Update Nginx configuration file # Update Nginx configuration file
nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf
sudo cp ../conf/nginx.conf $nginx_conf_file sudo cp ../conf/nginx.conf $nginx_conf_file
if [ $path = "/" ]; then
sudo sed -i "s@ROOTTOCHANGE@@g" $nginx_conf_file
else
sudo sed -i "s@ROOTTOCHANGE@$path@g" $nginx_conf_file
fi
sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file
sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" $nginx_conf_file sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" $nginx_conf_file
sudo sed -i "s@NAMETOCHANGE@$app@g" $nginx_conf_file sudo sed -i "s@NAMETOCHANGE@$app@g" $nginx_conf_file