From e891d064d5dcddb520ceda2afec820914c8dd0f3 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 23 Feb 2017 11:34:53 +0000 Subject: [PATCH 1/8] update maintainers --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index e76dca7..c009948 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "url": "http://rainloop.net/", "license": "free", "maintainer": { - "name": "scith, Djip007" + "name": "scith, Djip007, polytan02" }, "multi_instance": false, "services": [ From 4682460e1f8762db565014d6e4a7f6ede6be1c60 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 23 Feb 2017 11:35:28 +0000 Subject: [PATCH 2/8] multi instance true --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c009948..e500cc6 100644 --- a/manifest.json +++ b/manifest.json @@ -11,7 +11,7 @@ "maintainer": { "name": "scith, Djip007, polytan02" }, - "multi_instance": false, + "multi_instance": true, "services": [ "nginx", "php5-fpm", From d370ff668aab4cf659904d5dbb91a6f31869a77b Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 23 Feb 2017 11:36:04 +0000 Subject: [PATCH 3/8] multi instance true --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index afbfc25..a0eacb5 100644 --- a/check_process +++ b/check_process @@ -16,7 +16,7 @@ setup_public=1 upgrade=1 backup_restore=1 - multi_instance=0 + multi_instance=1 wrong_user=0 wrong_path=1 incorrect_path=1 @@ -42,7 +42,7 @@ setup_public=1 upgrade=1 backup_restore=1 - multi_instance=0 + multi_instance=1 wrong_user=0 wrong_path=1 incorrect_path=1 From 6163da9d71c0a3c1533d93435ee7ccdd0617ee05 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 23 Feb 2017 13:13:00 +0000 Subject: [PATCH 4/8] Use of ynh_helpers for database creation --- conf/create_database.sql | 1 - 1 file changed, 1 deletion(-) delete mode 100644 conf/create_database.sql diff --git a/conf/create_database.sql b/conf/create_database.sql deleted file mode 100644 index 165bab3..0000000 --- a/conf/create_database.sql +++ /dev/null @@ -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'@'%'; \ No newline at end of file From 18514ae63e8065d009e7a90a4e3950dae4638dfa Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 23 Feb 2017 13:13:25 +0000 Subject: [PATCH 5/8] Make the app multi instances --- conf/data/configs/application.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/data/configs/application.ini b/conf/data/configs/application.ini index 0dfec1b..4b22ba1 100644 --- a/conf/data/configs/application.ini +++ b/conf/data/configs/application.ini @@ -58,7 +58,7 @@ allow_sharing = On allow_sync = On sync_interval = 20 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_password = "MYSQLPASSWORD" suggestions_limit = 30 From 55b10fa44c556ba827709f23ce9ce572be4b1624 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 23 Feb 2017 13:13:34 +0000 Subject: [PATCH 6/8] Cleaning --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 42c9d9f..fb78555 100644 --- a/scripts/install +++ b/scripts/install @@ -89,7 +89,7 @@ sudo cp ../conf/data/configs/application.ini $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@LANGTOCHANGE@$lang@g" $application_file sudo sed -i "s@PLUGINSTOENABLE@$plugins@g" $application_file From 61f524c43bddc95a780161b0328826efa41dab6f Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 23 Feb 2017 13:32:47 +0000 Subject: [PATCH 7/8] Fix for installation on root of domain --- scripts/install | 6 +++++- scripts/upgrade | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index fb78555..eca382b 100644 --- a/scripts/install +++ b/scripts/install @@ -124,7 +124,11 @@ # Install Nginx configuration file nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf 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@PATHTOCHANGE@@g" $nginx_conf_file + else + sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file + fi sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" $nginx_conf_file sudo sed -i "s@NAMETOCHANGE@$app@g" $nginx_conf_file sudo chown root: $nginx_conf_file diff --git a/scripts/upgrade b/scripts/upgrade index 879d1ee..cb9a215 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,7 +82,11 @@ # Update Nginx configuration file nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf 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@PATHTOCHANGE@@g" $nginx_conf_file + else + sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file + fi sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" $nginx_conf_file sudo sed -i "s@NAMETOCHANGE@$app@g" $nginx_conf_file sudo chown root: $nginx_conf_file From 54878dba56be24a251a15780e1e78e24819e014f Mon Sep 17 00:00:00 2001 From: polytan02 Date: Thu, 23 Feb 2017 13:37:54 +0000 Subject: [PATCH 8/8] Fix for installation on rootbase of the domain --- conf/nginx.conf | 4 ++-- scripts/install | 5 +++-- scripts/upgrade | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index c45c7dc..04c3de4 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,11 +5,11 @@ location PATHTOCHANGE { rewrite ^ https://$server_name$request_uri? permanent; } - location ^~ PATHTOCHANGE/app/data { + location ^~ ROOTTOCHANGE/app/data { deny all; } - location ^~ PATHTOCHANGE/pgpback/keys { + location ^~ ROOTTOCHANGE/pgpback/keys { deny all; } diff --git a/scripts/install b/scripts/install index eca382b..d8a783c 100644 --- a/scripts/install +++ b/scripts/install @@ -125,10 +125,11 @@ nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf sudo cp ../conf/nginx.conf $nginx_conf_file if [ $path = "/" ]; then - sudo sed -i "s@PATHTOCHANGE@@g" $nginx_conf_file + sudo sed -i "s@ROOTTOCHANGE@@g" $nginx_conf_file else - sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file + 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@NAMETOCHANGE@$app@g" $nginx_conf_file sudo chown root: $nginx_conf_file diff --git a/scripts/upgrade b/scripts/upgrade index cb9a215..fce3938 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,10 +83,11 @@ nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf sudo cp ../conf/nginx.conf $nginx_conf_file if [ $path = "/" ]; then - sudo sed -i "s@PATHTOCHANGE@@g" $nginx_conf_file + sudo sed -i "s@ROOTTOCHANGE@@g" $nginx_conf_file else - sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file + 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@NAMETOCHANGE@$app@g" $nginx_conf_file sudo chown root: $nginx_conf_file