Rev | Line | |
---|
[d0df50b6] | 1 | #!/bin/bash |
---|
[71643c0] | 2 | # Comprobamos si los servicios de opengnsys están levantado y si no es así los iniciamos. |
---|
| 3 | # Variables. |
---|
| 4 | OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} |
---|
| 5 | LOGDIR="$OPENGNSYS/log" |
---|
| 6 | DEFAULTFILE=/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. |
---|
[d0df50b6] | 12 | if [ "$RUN_OGADMSERVER" == "yes" -a $(pgrep ogAdmServer | wc -w) == 0 ]; then |
---|
[71643c0] | 13 | date +"%d/%m/%Y %T ERROR: El servicio ogAdmServer estaba caido, se reinicia" >> $LOGDIR/ogAdmServer.log |
---|
| 14 | /etc/init.d/opengnsys restart |
---|
| 15 | fi |
---|
[d0df50b6] | 16 | if [ "$RUN_OGADMREPO" == "yes" -a $(pgrep ogAdmRepo | wc -w) == 0 ]; then |
---|
[71643c0] | 17 | date +"%d/%m/%Y %T ERROR: El servicio ogAdmRepo estaba caido, se reinicia" >> $LOGDIR/ogAdmRepo.log |
---|
| 18 | /etc/init.d/opengnsys restart |
---|
| 19 | fi |
---|
| 20 | |
---|
Note: See
TracBrowser
for help on using the repository browser.