This repository has been archived by the owner on Jan 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy
executable file
·53 lines (40 loc) · 1.24 KB
/
deploy
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
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -o nounset
set -o errexit
role=$1
ext="-Y EXTERNAL -H ldapi:///"
admin="-x -D cn=admin,dc=federez,dc=net -W -H ldapi:///"
. ./dist/debian
install_ldap ./dist/debconf
# dc=federez,dc=net
#sudo ldapadd -Y EXTERNAL -H ldapi:/// -f ./federez.net/base.ldif
ldapadd $admin -f ./federez.net/ou.ldif
# netFederez schema
sudo ldapadd $ext -f ./conf/schema/netfederez.ldif
# memberof
sudo ldapmodify $ext -f ./conf/overlay/memberof.ldif
# dyngroup
sudo ldapadd $ext -f /etc/ldap/schema/dyngroup.ldif
sudo ldapmodify $ext -f ./conf/overlay/dynlist.ldif
# ppolicy
sudo ldapadd $ext -f /etc/ldap/schema/ppolicy.ldif
sudo ldapmodify $ext -f ./conf/overlay/ppolicy.ldif
ldapmodify $admin -f ./conf/overlay/ppolicy_policies.ldif
sudo ldapmodify $ext -f ./conf/overlay/unique.ldif
sudo ldapmodify $ext -f ./conf/overlay/refint.ldif
ldapadd $admin -f ./conf/sync/syncuser.ldif
case "$role" in
provider)
sudo ldapadd $ext -f ./conf/sync/provider.ldif
;;
consumer)
sudo ldapadd $ext -f ./conf/sync/consumer.ldif
;;
nosync)
;;
*)
echo "Error: First argument must be consumer or provider"
exit 1
esac
ldapadd $admin -f ./test/users.ldif
install_webldap "$(pwd)/webldap/local_settings.py"