opengnsys-1.0.3
Line | |
---|
1 | # Comprobamos si los servicios de opengnsys están levantado y si no es así los iniciamos. |
---|
2 | # Variables. |
---|
3 | OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} |
---|
4 | LOGDIR="$OPENGNSYS/log" |
---|
5 | DEFAULTFILE=/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. |
---|
11 | if [ "$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 |
---|
14 | fi |
---|
15 | if [ "$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 |
---|
18 | fi |
---|
19 | |
---|
Note: See
TracBrowser
for help on using the repository browser.