mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] slapd configuration needed for postinstall
This commit is contained in:
parent
0247d52ea2
commit
7b308a0fc2
2 changed files with 16 additions and 10 deletions
|
@ -4,23 +4,28 @@ set -e
|
||||||
force=$1
|
force=$1
|
||||||
|
|
||||||
function safe_copy () {
|
function safe_copy () {
|
||||||
if [[ "$force" == "True" ]]; then
|
if [ ! -f /etc/yunohost/installed ]; then
|
||||||
sudo yunohost service safecopy \
|
sudo cp $1 $2
|
||||||
-s slapd \
|
|
||||||
$1 $2 \
|
|
||||||
--force
|
|
||||||
else
|
else
|
||||||
sudo yunohost service safecopy \
|
if [[ "$force" == "True" ]]; then
|
||||||
-s slapd \
|
sudo yunohost service safecopy \
|
||||||
$1 $2
|
-s slapd \
|
||||||
|
$1 $2 \
|
||||||
|
--force
|
||||||
|
else
|
||||||
|
sudo yunohost service safecopy \
|
||||||
|
-s slapd \
|
||||||
|
$1 $2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/slapd
|
cd /usr/share/yunohost/templates/slapd
|
||||||
|
|
||||||
# Remove legacy configuration file
|
# Remove legacy configuration file
|
||||||
sudo yunohost service saferemove -s slapd \
|
[ ! -f /etc/yunohost/installed ] \
|
||||||
/etc/ldap/slapd-yuno.conf
|
|| sudo yunohost service saferemove -s slapd \
|
||||||
|
/etc/ldap/slapd-yuno.conf
|
||||||
|
|
||||||
safe_copy mailserver.schema /etc/ldap/schema/mailserver.schema
|
safe_copy mailserver.schema /etc/ldap/schema/mailserver.schema
|
||||||
safe_copy ldap.conf /etc/ldap/ldap.conf
|
safe_copy ldap.conf /etc/ldap/ldap.conf
|
||||||
|
|
1
debian/postinst
vendored
1
debian/postinst
vendored
|
@ -9,6 +9,7 @@ do_configure() {
|
||||||
if [ ! -f /etc/yunohost/installed ]; then
|
if [ ! -f /etc/yunohost/installed ]; then
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/01-yunohost
|
bash /usr/share/yunohost/hooks/conf_regen/01-yunohost
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/02-ssl
|
bash /usr/share/yunohost/hooks/conf_regen/02-ssl
|
||||||
|
bash /usr/share/yunohost/hooks/conf_regen/06-slapd
|
||||||
bash /usr/share/yunohost/hooks/conf_regen/15-nginx
|
bash /usr/share/yunohost/hooks/conf_regen/15-nginx
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue