From 1f2b2e784ea0005f87922e5d6e07a5cb3c933d8e Mon Sep 17 00:00:00 2001 From: realitygaps Date: Fri, 29 Apr 2016 18:08:30 +0200 Subject: [PATCH] Adding ldap variables --- conf/rocketchat_ldap.js | 41 +++++++++++++++++++++++++++++++++++++++++ scripts/install | 8 +++++--- 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 conf/rocketchat_ldap.js diff --git a/conf/rocketchat_ldap.js b/conf/rocketchat_ldap.js new file mode 100644 index 0000000..3f32f3f --- /dev/null +++ b/conf/rocketchat_ldap.js @@ -0,0 +1,41 @@ +use rocketchat + + +db.rocketchat_settings.update( + { "_id" : "LDAP_Enable" }, + { + $set: { "value": true } + } +) +db.rocketchat_settings.update( + { "_id" : "LDAP_Domain_Base" }, + { + $set: { "value": "dc=yunohost,dc=org" } + } +) +db.rocketchat_settings.update( + { "_id" : "LDAP_Domain_Search_User_ID" }, + { + $set: { "value": "uid" } + } +) +db.rocketchat_settings.update( + { "_id" : "LDAP_Domain_Search_Object_Class" }, + { + $set: { "value": "inetOrgPerson" } + } +) +db.rocketchat_settings.update( + { "_id" : "LDAP_Sync_User_Data" }, + { + $set: { "value": true } + } +) +db.rocketchat_settings.update( + { "_id" : "Accounts_RegistrationForm" }, + { + $set: { "value": "Disabled" } + } +) + + diff --git a/scripts/install b/scripts/install index 3b99603..2b75e45 100644 --- a/scripts/install +++ b/scripts/install @@ -39,7 +39,7 @@ else sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/rocketchat.conf fi - +pkgdir=$(pwd) # Copy files to the right place final_path=/var/www/rocketchat @@ -54,8 +54,6 @@ sudo npm install cd $final_path/ -sudo chmod +x /var/www/rocketchat/bin/rockit - sudo chown -R www-data: $final_path @@ -68,6 +66,10 @@ fi sudo systemctl start Rocketchat.service sudo systemctl enable Rocketchat.service +cd $pkgdir + +sudo mongo < ../conf/rocketchat_ldap.js + sudo yunohost app ssowatconf