[ldap-replicats] Ajout de choses aux templates, et d'un script de mise en place avec action.
Ignore-this: 9b8f69f789e3f897006dc188fba0f1fe darcs-hash:20130118053524-afe24-11be822a208edfde0ad4fc877ac85682b7bdc7ac.gz
This commit is contained in:
parent
9a2df0bd56
commit
e350665e00
4 changed files with 71 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="db-replicat">
|
<Group name="db-replicat">
|
||||||
<Path name="/etc/ldap/templatedir/README"/>
|
<Path name="/etc/ldap/templatedir/README"/>
|
||||||
|
<Path name="/etc/ldap/templatedir/cn=config.ldif"/>
|
||||||
<Path name="/etc/ldap/templatedir/cn=config/cn=schema.ldif"/>
|
<Path name="/etc/ldap/templatedir/cn=config/cn=schema.ldif"/>
|
||||||
<Path name="/etc/ldap/templatedir/cn=config/cn=schema/cn={0}core.ldif"/>
|
<Path name="/etc/ldap/templatedir/cn=config/cn=schema/cn={0}core.ldif"/>
|
||||||
<Path name="/etc/ldap/templatedir/cn=config/cn=schema/cn={1}cosine.ldif"/>
|
<Path name="/etc/ldap/templatedir/cn=config/cn=schema/cn={1}cosine.ldif"/>
|
||||||
|
@ -24,6 +25,8 @@
|
||||||
<Path name="/etc/ldap/templatedir/cn=config/olcDatabase={-1}frontend.ldif"/>
|
<Path name="/etc/ldap/templatedir/cn=config/olcDatabase={-1}frontend.ldif"/>
|
||||||
<Path name="/etc/ldap/templatedir/cn=config/olcDatabase={1}bdb/olcOverlay={0}dynlist.ldif"/>
|
<Path name="/etc/ldap/templatedir/cn=config/olcDatabase={1}bdb/olcOverlay={0}dynlist.ldif"/>
|
||||||
<Path name="/etc/ldap/templatedir/cn=config/cn=module{0}.ldif"/>
|
<Path name="/etc/ldap/templatedir/cn=config/cn=module{0}.ldif"/>
|
||||||
|
<Action name="peupler-replicat"/>
|
||||||
|
<Path name="/etc/ldap/peupler-replicat" type="file"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Package name="shelldap"/>
|
<Package name="shelldap"/>
|
||||||
</Bundle>
|
</Bundle>
|
||||||
|
|
16
Cfg/etc/ldap/peupler-replicat/peupler-replicat
Executable file
16
Cfg/etc/ldap/peupler-replicat/peupler-replicat
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
FILE="/etc/ldap/replica_peuple"
|
||||||
|
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
|
||||||
|
|
||||||
|
if [ ! -f ${FILE} ] || [ $1 = '-f' ]; then
|
||||||
|
rm ${FILE} 2> /dev/null
|
||||||
|
monit stop slapd
|
||||||
|
rm -f /var/lib/ldap/[^D]*
|
||||||
|
rm -rf /etc/ldap/slapd.d/
|
||||||
|
mkdir /etc/ldap/slapd.d/
|
||||||
|
cp -r /etc/ldap/templatedir/* /etc/ldap/slapd.d
|
||||||
|
monit start slapd
|
||||||
|
touch ${FILE}
|
||||||
|
else
|
||||||
|
echo "Le fichier ${FILE} est présent, rien à faire."
|
||||||
|
fi;
|
40
Cfg/etc/ldap/templatedir/cn=config.ldif/cn=config.ldif
Normal file
40
Cfg/etc/ldap/templatedir/cn=config.ldif/cn=config.ldif
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
dn: cn=config
|
||||||
|
objectClass: olcGlobal
|
||||||
|
cn: config
|
||||||
|
olcConfigFile: /etc/ldap/slapd.conf
|
||||||
|
olcConfigDir: /etc/ldap/slapd.d
|
||||||
|
olcArgsFile: /var/run/slapd/slapd.args
|
||||||
|
olcAttributeOptions: lang-
|
||||||
|
olcAuthzPolicy: none
|
||||||
|
olcConcurrency: 0
|
||||||
|
olcConnMaxPending: 100
|
||||||
|
olcConnMaxPendingAuth: 1000
|
||||||
|
olcGentleHUP: FALSE
|
||||||
|
olcIdleTimeout: 0
|
||||||
|
olcIndexSubstrIfMaxLen: 4
|
||||||
|
olcIndexSubstrIfMinLen: 2
|
||||||
|
olcIndexSubstrAnyLen: 4
|
||||||
|
olcIndexSubstrAnyStep: 2
|
||||||
|
olcIndexIntLen: 4
|
||||||
|
olcLocalSSF: 71
|
||||||
|
olcLogLevel: 0
|
||||||
|
olcPidFile: /var/run/slapd/slapd.pid
|
||||||
|
olcReadOnly: FALSE
|
||||||
|
olcReverseLookup: FALSE
|
||||||
|
olcSaslSecProps: noplain,noanonymous
|
||||||
|
olcSizeLimit: 1000000000
|
||||||
|
olcSockbufMaxIncoming: 262143
|
||||||
|
olcSockbufMaxIncomingAuth: 16777215
|
||||||
|
olcThreads: 16
|
||||||
|
olcTLSVerifyClient: never
|
||||||
|
olcToolThreads: 1
|
||||||
|
olcWriteTimeout: 0
|
||||||
|
structuralObjectClass: olcGlobal
|
||||||
|
entryUUID: 55f2eea8-59fb-102f-967b-112b7bde9a51
|
||||||
|
creatorsName: cn=config
|
||||||
|
createTimestamp: 20100921183939Z
|
||||||
|
olcAllows: bind_anon_dn
|
||||||
|
entryCSN: 20101111203126.914481Z#000000#000#000000
|
||||||
|
modifiersName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
|
||||||
|
modifyTimestamp: 20101111203126Z
|
||||||
|
contextCSN: 20130115030207.670596Z#000000#000#000000
|
12
Rules/slapd.xml
Normal file
12
Rules/slapd.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<!-- Règles concernant les serveurs équipés de slapd//-->
|
||||||
|
<Rules priority="1">
|
||||||
|
<Group name="db-replicat">
|
||||||
|
<!-- ne marche juste pas, et je sais pas pourquoi. Ras le cul. fuck up, Action <Path name="/etc/ldap/peupler-replicat" type="permissions" owner="root" group="adm" perms="0744"/> //-->
|
||||||
|
<Path name="/etc/ldap/slapd.d" type="directory" owner="root" group="adm" perms="0750"/>
|
||||||
|
<Path name="/etc/ldap/templatedir" type="directory" owner="root" group="adm" perms="0750"/>
|
||||||
|
<Action name="peupler-replicat" timing="post"
|
||||||
|
when="always" status="check"
|
||||||
|
command="/bin/chmod 740 /etc/ldap/peupler-replicat; /bin/chown root:root /etc/ldap/peupler-replicat; /etc/ldap/peupler-replicat"/>
|
||||||
|
</Group>
|
||||||
|
<Service type="deb" name="slapd" status="on"/>
|
||||||
|
</Rules>
|
Loading…
Add table
Add a link
Reference in a new issue