|
124 |
check_ldap_tls_connection () { |
124 |
check_ldap_tls_connection () { |
125 |
echo -n "Check TLS connection " |
125 |
echo -n "Check TLS connection " |
126 |
|
126 |
|
127 |
eval "$(ucr shell ldap/master/port)" |
127 |
eval "$(univention-config-registry shell ldap/master/port)" |
128 |
|
128 |
|
129 |
ldapsearch -x -ZZ -p "$ldap_master_port" -s base -h "$DCNAME" -D "$binddn" -w "$(<"$DCPWD")" dn >/dev/null |
129 |
ldapsearch -x -ZZ -p "$ldap_master_port" -s base -h "$DCNAME" -D "$binddn" -w "$(<"$DCPWD")" dn >/dev/null |
130 |
if [ $? != 0 ]; then |
130 |
if [ $? != 0 ]; then |
|
254 |
|
254 |
|
255 |
|
255 |
|
256 |
# get master versions |
256 |
# get master versions |
257 |
versions="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" /usr/sbin/ucr search --brief ^version/)" |
257 |
versions="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" /usr/sbin/univention-config-registry search --brief ^version/)" |
258 |
OLDIFS=$IFS |
258 |
OLDIFS=$IFS |
259 |
IFS=$'\n' |
259 |
IFS=$'\n' |
260 |
for i in $versions; do |
260 |
for i in $versions; do |
|
301 |
if [ -x /etc/init.d/samba4 ]; then |
301 |
if [ -x /etc/init.d/samba4 ]; then |
302 |
echo -n "Stop Samba 4 Server: " |
302 |
echo -n "Stop Samba 4 Server: " |
303 |
if [ "$dns_backend" = "samba4" ]; then |
303 |
if [ "$dns_backend" = "samba4" ]; then |
304 |
ucr set dns/backend=ldap >>/var/log/univention/join.log 2>&1 |
304 |
univention-config-registry set dns/backend=ldap >>/var/log/univention/join.log 2>&1 |
305 |
/etc/init.d/bind9 restart >>/var/log/univention/join.log 2>&1 |
305 |
/etc/init.d/bind9 restart >>/var/log/univention/join.log 2>&1 |
306 |
fi |
306 |
fi |
307 |
/etc/init.d/samba4 stop >>/var/log/univention/join.log 2>&1 |
307 |
/etc/init.d/samba4 stop >>/var/log/univention/join.log 2>&1 |
|
310 |
|
310 |
|
311 |
if [ -z "$LDAPBASE" ]; then |
311 |
if [ -z "$LDAPBASE" ]; then |
312 |
echo -n "Search ldap/base" |
312 |
echo -n "Search ldap/base" |
313 |
ldap_base="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" /usr/sbin/ucr search --brief ^ldap/base$ | sed -ne 's|^ldap/base: ||p')" |
313 |
ldap_base="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" /usr/sbin/univention-config-registry search --brief ^ldap/base$ | sed -ne 's|^ldap/base: ||p')" |
314 |
else |
314 |
else |
315 |
ldap_base="$LDAPBASE" |
315 |
ldap_base="$LDAPBASE" |
316 |
fi |
316 |
fi |
|
332 |
|
332 |
|
333 |
# First use udm to search the user DN |
333 |
# First use udm to search the user DN |
334 |
binddn="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" \ |
334 |
binddn="$(univention-ssh "$DCPWD" "${DCACCOUNT}@${DCNAME}" \ |
335 |
/usr/sbin/udm users/user list --filter uid="$DCACCOUNT" --logfile /dev/null | sed -ne 's|^DN: ||p')" |
335 |
/usr/sbin/univention-directory-manager users/user list --filter uid="$DCACCOUNT" --logfile /dev/null | sed -ne 's|^DN: ||p')" |
336 |
|
336 |
|
337 |
if [ -z "$binddn" ]; then |
337 |
if [ -z "$binddn" ]; then |
338 |
# Next check is the local ldapi interface |
338 |
# Next check is the local ldapi interface |
|
478 |
if [ -e /etc/runit/univention/univention-directory-listener ]; then |
478 |
if [ -e /etc/runit/univention/univention-directory-listener ]; then |
479 |
echo -n "Stopping univention-directory-listener daemon: " |
479 |
echo -n "Stopping univention-directory-listener daemon: " |
480 |
/etc/init.d/univention-directory-listener stop >/dev/null 2>&1 |
480 |
/etc/init.d/univention-directory-listener stop >/dev/null 2>&1 |
481 |
while ! sv status univention-directory-listener | grep "^down" >/dev/null |
481 |
while ! sv status univention-directory-listener | grep -q "^down" |
482 |
do |
482 |
do |
483 |
sleep 1 |
483 |
sleep 1 |
484 |
/etc/init.d/univention-directory-listener stop >/dev/null 2>&1 |
484 |
/etc/init.d/univention-directory-listener stop >/dev/null 2>&1 |