From 5641ae96b36c5551b83e78ae51a126adc0125afb Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 24 May 2019 19:26:27 +0200 Subject: #908: Initialization loop to check if OGAgent for ogLive is down. --- client/shared/etc/init/default.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/shared/etc/init/default.sh b/client/shared/etc/init/default.sh index 229278ea..ab4052b4 100755 --- a/client/shared/etc/init/default.sh +++ b/client/shared/etc/init/default.sh @@ -27,7 +27,10 @@ if [ -f "$OPENGNSYS/images/ogagent-oglive_${VERSION}_all.deb" -a "$ogstatus" != -e "s,secret=.*,secret=$CLIENTSECRET," \ /usr/share/OGAgent/cfg/ogagent.cfg ogagent start - sleep 10 + while : ; do + sleep 60 + [ $(pgrep -fac OGAgent) -eq 0 ] && ogagent restart + done elif [ -x "$OPENGNSYS/bin/ogAdmClient" -a "$ogstatus" != "offline" ]; then # Ejecutar servicio cliente. $OPENGNSYS/bin/ogAdmClient -f $OPENGNSYS/etc/ogAdmClient.cfg -l $OGLOGFILE -d $LOGLEVEL -- cgit v1.2.3-18-g5258