restore_lsexample: fix exit code on success

This commit is contained in:
Benjamin Renard 2022-06-08 12:01:27 +02:00
parent 457995bc22
commit 7eee7e32b9

View file

@ -111,5 +111,8 @@ EOF
# Add database
[ $VERBOSE -eq 1 ] && echo "Import lsexample database in slapd" && VERBOSE_ARG="--verbose" || VERBOSE_ARG=""
# Ldapvi need TERM variable is set
TERM=xterm $LDAPVI -p config $VERBOSE_ARG --ldapmodify --ldapvi --add $SLAPD_DB_LDIF
TERM=xterm $LDAPVI -p config --noninteractive $VERBOSE_ARG --ldapmodify --ldapvi --add $SLAPD_DB_LDIF
[ $? -ne 0 ] && fatalerror "An error occurred importing lsexample database in slapd."
[ $VERBOSE -eq 1 ] && echo "LSexample successfully restored"
exit 0