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:
commit
fd67d78a91
7 changed files with 20 additions and 11 deletions
|
@ -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
|
||||||
|
|
|
@ -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'@'%';
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
|
|
||||||
sudo cp ../conf/data/configs/application.ini $application_file
|
sudo cp ../conf/data/configs/application.ini $application_file
|
||||||
sudo sed -i "s@domain.tld@$domain@g" $application_file
|
sudo sed -i "s@domain.tld@$domain@g" $application_file
|
||||||
sudo sed -i "s@MYSQLUSER@$dbuser@g" $application_file
|
sudo sed -i "s@MYSQLUSER@$dbuser@g" $application_file
|
||||||
sudo sed -i "s@MYSQLPASSWORD@$dbpass@g" $application_file
|
sudo sed -i "s@MYSQLPASSWORD@$dbpass@g" $application_file
|
||||||
sudo sed -i "s@LANGTOCHANGE@$lang@g" $application_file
|
sudo sed -i "s@LANGTOCHANGE@$lang@g" $application_file
|
||||||
sudo sed -i "s@PLUGINSTOENABLE@$plugins@g" $application_file
|
sudo sed -i "s@PLUGINSTOENABLE@$plugins@g" $application_file
|
||||||
|
@ -124,7 +124,12 @@
|
||||||
# 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
|
||||||
sudo sed -i "s@PATHTOCHANGE@$path@g" $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@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
|
||||||
sudo chown root: $nginx_conf_file
|
sudo chown root: $nginx_conf_file
|
||||||
|
|
|
@ -82,7 +82,12 @@
|
||||||
# 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
|
||||||
sudo sed -i "s@PATHTOCHANGE@$path@g" $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@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
|
||||||
sudo chown root: $nginx_conf_file
|
sudo chown root: $nginx_conf_file
|
||||||
|
|
Loading…
Reference in a new issue