mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 01:14:21 +01:00
add a small script to generate a local dev config
This commit is contained in:
parent
921a0820f4
commit
69526610f3
18
goodies/gen-dev-conf.sh
Executable file
18
goodies/gen-dev-conf.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
ROOT=$(readlink -f $(dirname $0)/../)
|
||||
|
||||
cp $ROOT/conf/ldapcherry.ini $ROOT/ldapcherry-dev.ini
|
||||
|
||||
sed -i "s|/etc/ldapcherry/|$ROOT/conf/|" $ROOT/ldapcherry-dev.ini
|
||||
sed -i "s|/usr/share/ldapcherry/|$ROOT/resources/|" $ROOT/ldapcherry-dev.ini
|
||||
sed -i "s|^ldap\.|#ldap.|" $ROOT/ldapcherry-dev.ini
|
||||
sed -i "s|#demo\.|ldap.|" $ROOT/ldapcherry-dev.ini
|
||||
|
||||
GROUPS='cn=nagios admins\\,ou=Group\\,dc=example\\,dc=org, cn=users\\,ou=Group\\,dc=example\\,dc=org'
|
||||
sed -i "s|ldap.admin.groups.*|ldap.admin.groups = '$GROUPS'|" $ROOT/ldapcherry-dev.ini
|
||||
|
||||
|
||||
sed -i "s|^min_length.*|min_length = 3|" $ROOT/ldapcherry-dev.ini
|
||||
sed -i "s|^min_upper.*|min_upper = 0|" $ROOT/ldapcherry-dev.ini
|
||||
sed -i "s|^min_digit.*|min_digit = 0|" $ROOT/ldapcherry-dev.ini
|
Loading…
Reference in New Issue
Block a user