From bd8ef0a3d5652b37b75e48658334be3fa5870cf9 Mon Sep 17 00:00:00 2001 Message-Id: From: Philipp Hahn Date: Fri, 21 Apr 2017 13:12:30 +0200 Subject: [PATCH] Bug #24522 udl: Fix runsv supervision Organization: Univention GmbH, Bremen, Germany runsvdir needs up to 5s to detect and start the new corresponding runsv process. Wait until then before starting UDL. --- .../02univention-directory-notifier.inst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/management/univention-directory-notifier/02univention-directory-notifier.inst b/management/univention-directory-notifier/02univention-directory-notifier.inst index 7bfc771737..335eb50151 100755 --- a/management/univention-directory-notifier/02univention-directory-notifier.inst +++ b/management/univention-directory-notifier/02univention-directory-notifier.inst @@ -35,11 +35,14 @@ VERSION=1 . /usr/share/univention-join/joinscripthelper.lib joinscript_init -ln -sf /etc/runit/univention-directory-notifier /etc/runit/univention/univention-directory-notifier - +ln -snf /etc/runit/univention-directory-notifier /etc/runit/univention/univention-directory-notifier +# Give runsvdir up to 15s to find the new service and to start the corresponding runsv +for i in 1 2 3 +do + [ -e /etc/runit/univention-directory-notifier/supervise/ok ] && break + sleep 5 +done /etc/init.d/univention-directory-notifier start joinscript_save_current_version exit 0 - - -- 2.11.0