source: repoman/bin/opengnsys.cron @ 51c2318

Last change on this file since 51c2318 was d0df50b6, checked in by ramon <ramongomez@…>, 13 years ago

Versión 1.0.4, #531: Integrar versión 1.0.4 en rama principal.

git-svn-id: https://opengnsys.es/svn/trunk@3259 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 819 bytes
Line 
1#!/bin/bash
2# Comprobamos si los servicios de opengnsys están levantado y si no es así los iniciamos.
3# Variables.
4OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"}
5LOGDIR="$OPENGNSYS/log"
6DEFAULTFILE=/etc/default/opengnsys
7
8# Comprobar servicios que deben estar activos.
9[ -f $DEFAULTFILE ] && source $DEFAULTFILE
10
11# Si un servicio debe estar activo y no se está ejecutando, reiniciar OpenGnSys.
12if [ "$RUN_OGADMSERVER" == "yes" -a $(pgrep ogAdmServer | wc -w) == 0 ]; then
13        date +"%d/%m/%Y %T ERROR: El servicio ogAdmServer  estaba caido, se reinicia" >> $LOGDIR/ogAdmServer.log
14        /etc/init.d/opengnsys restart
15fi
16if [ "$RUN_OGADMREPO" == "yes" -a $(pgrep ogAdmRepo | wc -w) == 0 ]; then
17        date +"%d/%m/%Y %T ERROR: El servicio ogAdmRepo estaba caido, se reinicia" >> $LOGDIR/ogAdmRepo.log
18        /etc/init.d/opengnsys restart
19fi
20
Note: See TracBrowser for help on using the repository browser.