mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] error with slpacat and slapd-yuno.conf
This commit is contained in:
parent
04e9658f37
commit
027ec16978
1 changed files with 8 additions and 0 deletions
|
@ -1,7 +1,15 @@
|
||||||
backup_dir="$1/conf/ldap"
|
backup_dir="$1/conf/ldap"
|
||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
|
# Fix for first jessie yunohost where slapd.conf is called slapd-yuno.conf
|
||||||
|
# without slapcat doesn't work
|
||||||
|
if [ ! -f /etc/ldap/slapd.conf ]
|
||||||
|
then
|
||||||
|
sudo mv /etc/ldap/slapd-yuno.conf /etc/ldap/slapd.conf
|
||||||
|
fi
|
||||||
|
|
||||||
sudo cp -a /etc/ldap/slapd.conf $backup_dir/
|
sudo cp -a /etc/ldap/slapd.conf $backup_dir/
|
||||||
|
|
||||||
sudo slapcat -l $backup_dir/slapcat.ldif.raw
|
sudo slapcat -l $backup_dir/slapcat.ldif.raw
|
||||||
egrep -v "^entryCSN:" < $backup_dir/slapcat.ldif.raw > $backup_dir/slapcat.ldif
|
egrep -v "^entryCSN:" < $backup_dir/slapcat.ldif.raw > $backup_dir/slapcat.ldif
|
||||||
rm -f $backup_dir/slapcat.ldif.raw
|
rm -f $backup_dir/slapcat.ldif.raw
|
||||||
|
|
Loading…
Add table
Reference in a new issue