summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-05-24 19:26:27 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-05-24 19:26:27 +0200
commit5641ae96b36c5551b83e78ae51a126adc0125afb (patch)
treec19066f3043b2e0d37e52e6313d89acbdb4cffef
parent63fa47a1eec0ed52f8f93e78d17245631c23e8a8 (diff)
#908: Initialization loop to check if OGAgent for ogLive is down.
-rwxr-xr-xclient/shared/etc/init/default.sh5
1 files changed, 4 insertions, 1 deletions
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