ldap_register.sh
1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
################################################### Configuração #####################################################
#1. Endereco para redmine
ADDRESS_REDMINE="localhost:9080/redmine"
#2. Endereco para gitlab
ADDRESS_GITLAB="192.168.1.113:80"
#3. dados de configuracao ldap
HOST="localhost"
PORT="389"
USERNAME="cn=admin,dc=sei,dc=com"
BASE="dc=sei,dc=com"
PASSWORD="cfl5OcVJ"
#######################################################################################################################
cd /opt
git clone https://github.com/macartur/Ldap-Register.git
cd Ldap-Register
bundle install
sudo yum install nodejs
# criar arquivo de configuração ldap
echo "host: ${HOST}" > /opt/Ldap-Register/config/ldap.yml
echo "port: ${PORT} ">> /opt/Ldap-Register/config/ldap.yml
echo "userName: ${USERNAME} " >> /opt/Ldap-Register/config/ldap.yml
echo "password: ${PASSWORD} " >> /opt/Ldap-Register/config/ldap.yml
echo "dc: ${BASE} " >> /opt/Ldap-Register/config/ldap.yml
# criar arquivo de configuracao referencias
echo "redmine: ${ADDRESS_REDMINE}" > /opt/Ldap-Register/config/references.yml
echo "gitlab: ${ADDRESS_GITLAB} " >> /opt/Ldap-Register/config/references.yml
sudo /usr/local/bin/unicorn_rails -c /opt/Ldap-Register/config/unicorn.rb -E production -l 0.0.0.0:443 -D