Univention Bugzilla – Attachment 9828 Details for
Bug 41262
Include univention-replicate-many into notifier package
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
2.patch
2.patch (text/plain), 2.42 KB, created by
Arvid Requate
on 2019-02-05 14:04:26 CET
(
hide
)
Description:
2.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2019-02-05 14:04:26 CET
Size:
2.42 KB
patch
obsolete
>diff --git a/management/univention-directory-notifier/univention-replicate-many b/management/univention-directory-notifier/univention-replicate-many >index 029663bc41..cf21b0d8b5 100755 >--- a/management/univention-directory-notifier/univention-replicate-many >+++ b/management/univention-directory-notifier/univention-replicate-many >@@ -68,7 +68,7 @@ RESTART_NOTIFIER=0 > if pidof univention-directory-notifier >/dev/null ; then > echo -n "Stopping notifier: " > RESTART_NOTIFIER=1 >- /etc/init.d/univention-directory-notifier stop >/dev/null >+ systemctl stop univention-directory-notifier > sleep 1 > if pidof univention-directory-notifier >/dev/null ; then > echo "failed" >@@ -82,7 +82,7 @@ RESTART_SLAPD=0 > if pidof slapd >/dev/null ; then > echo -n "Stopping slapd: " > RESTART_SLAPD=1 >- /etc/init.d/slapd stop >/dev/null >+ systemctl stop slapd > sleep 1 > if pidof slapd >/dev/null ; then > echo "failed" >@@ -97,7 +97,7 @@ id="$(tail -n 1 /var/lib/univention-ldap/notify/transaction | awk '{print $1}')" > > last_line="$(tail -n 1 /var/lib/univention-ldap/listener/listener)" > if [ -n "$last_line" ]; then >- id_listener="$(tail -n 1 /var/lib/univention-ldap/listener/listener | awk '{print $1}')" >+ id_listener="$(awk '{print $1}' <<<"$last_line")" > fi > > if [ -n "$id_listener" ] && [ "$id_listener" -gt "$id" ]; then >@@ -106,31 +106,39 @@ else > nextid=$((id+1)) > fi > >-skip= >+skip='' > while read -r dn; do > if [ -n "$dn" ] && slapdn "$dn" > /dev/null 2>&1; then > echo "$nextid $dn m" >>/var/lib/univention-ldap/listener/listener > echo -n "$nextid" >/var/lib/univention-ldap/last_id > nextid=$((nextid+1)) > else >- # shellcheck disable=SC2206,SC1117 >- test -n "$dn" && skip=($skip"Info: Skipped invalid dn '$dn'\n") >+ # shellcheck disable=SC1117 >+ test -n "$dn" && skip="${skip}Info: Skipped invalid dn '$dn'\n" > fi > done < "${dnfile}" > echo "done" >-echo -ne "${skip[*]}" >&2 >+echo -ne "$skip" >&2 >+ > rc=0 >+if [ "$RESTART_SLAPD" = 1 ]; then >+ echo -n "Starting slapd: " >+ if systemctl start slapd; then >+ echo "done" >+ else >+ echo "failed" >+ rc=1 >+ fi >+fi > > if [ "$RESTART_NOTIFIER" = 1 ]; then > echo -n "Starting notifier: " >- /etc/init.d/univention-directory-notifier start >/dev/null || rc=1 >- echo "done" >-fi >- >-if [ "$RESTART_SLAPD" = 1 ]; then >- echo -n "Starting slapd: " >- /etc/init.d/slapd start >/dev/null || rc=1 >- echo "done" >+ if systemctl start univention-directory-notifier; then >+ echo "done" >+ else >+ echo "failed" >+ rc=1 >+ fi > fi > > exit $rc
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 41262
:
7655
|
9745
|
9827
| 9828