source: repoman/bin/opengnsys.cron @ 0f04225

opengnsys-1.0.3
Last change on this file since 0f04225 was 71643c0, checked in by ramon <ramongomez@…>, 13 years ago

Integrar versión 1.0.2 en rama trunk (modificar #464).

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

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