mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 01:14:21 +01:00
slightly cleaner testenv deploy script
This commit is contained in:
parent
ccc252965d
commit
be598b0129
@ -4,7 +4,13 @@ DEBIAN_FRONTEND=noninteractive apt-get install ldap-utils slapd -o Dpkg::Options
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install samba -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -f -q -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install winbind -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -f -q -y
|
||||
|
||||
rsync -a `dirname $0`/ /
|
||||
[ -e '/etc/default/slapd' ] && mv /etc/default/slapd.ori-prelc
|
||||
cp -r `dirname $0`/etc/default/slapd /etc/default/slapd
|
||||
[ -e '/etc/ldap' ] && mv /etc/ldap.ori-prelc
|
||||
cp -r `dirname $0`/etc/ldap /etc/ldap
|
||||
[ -e '/etc/ldapcherry' ] && mv /etc/ldapcherry.ori-prelc
|
||||
cp -r `dirname $0`/etc/ldapcherry /etc/ldapcherry
|
||||
|
||||
cd `dirname $0`/../../
|
||||
sudo sed -i "s%template_dir.*%template_dir = '`pwd`/resources/templates/'%" /etc/ldapcherry/ldapcherry.ini
|
||||
sudo sed -i "s%tools.staticdir.dir.*%tools.staticdir.dir = '`pwd`/resources/static/'%" /etc/ldapcherry/ldapcherry.ini
|
||||
@ -13,7 +19,7 @@ chown -R openldap:openldap /etc/ldap/
|
||||
rm /etc/ldap/slapd.d/cn\=config/*mdb*
|
||||
/etc/init.d/slapd restart
|
||||
ldapadd -c -H ldap://localhost:390 -x -D "cn=admin,dc=example,dc=org" -f /etc/ldap/content.ldif -w password
|
||||
if grep -q '127.0.0.1' /etc/hosts
|
||||
if grep -q '127.0.0.1' /etc/hosts && ! grep -q 'ldap.ldapcherry.org' /etc/hosts
|
||||
then
|
||||
sed -i "s/\(127.0.0.1.*\)/\1 ldap.ldapcherry.org ad.ldapcherry.org ldap.dnscherry.org/" /etc/hosts
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user