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,6 +4,9 @@ set -e
|
|||
force=$1
|
||||
|
||||
function safe_copy () {
|
||||
if [ ! -f /etc/yunohost/installed ]; then
|
||||
sudo cp $1 $2
|
||||
else
|
||||
if [[ "$force" == "True" ]]; then
|
||||
sudo yunohost service safecopy \
|
||||
-s slapd \
|
||||
|
@ -14,12 +17,14 @@ function safe_copy () {
|
|||
-s slapd \
|
||||
$1 $2
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
cd /usr/share/yunohost/templates/slapd
|
||||
|
||||
# Remove legacy configuration file
|
||||
sudo yunohost service saferemove -s slapd \
|
||||
[ ! -f /etc/yunohost/installed ] \
|
||||
|| sudo yunohost service saferemove -s slapd \
|
||||
/etc/ldap/slapd-yuno.conf
|
||||
|
||||
safe_copy mailserver.schema /etc/ldap/schema/mailserver.schema
|
||||
|
|
1
debian/postinst
vendored
1
debian/postinst
vendored
|
@ -9,6 +9,7 @@ do_configure() {
|
|||
if [ ! -f /etc/yunohost/installed ]; then
|
||||
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/06-slapd
|
||||
bash /usr/share/yunohost/hooks/conf_regen/15-nginx
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue