diff options
author | irina <irinagomez@us.es> | 2011-07-01 09:19:24 +0000 |
---|---|---|
committer | irina <irinagomez@us.es> | 2011-07-01 09:19:24 +0000 |
commit | 24f551604a4b95ed42173650af124cdae5b6abfc (patch) | |
tree | f2f26b991e79f6a832a01bd9882e30542e2b6d69 /repoman/bin | |
parent | ada7fba012235f90ed5e69fdf928c99cb1ac6a29 (diff) |
Plantilla para logrotate y script para el cron que levanta los servicios si estan caidos
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2123 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'repoman/bin')
-rwxr-xr-x | repoman/bin/opengnsys.cron | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/repoman/bin/opengnsys.cron b/repoman/bin/opengnsys.cron new file mode 100755 index 00000000..b8b50a1d --- /dev/null +++ b/repoman/bin/opengnsys.cron @@ -0,0 +1,15 @@ +# Comprobamos si los servicios de opengnsys están levantado y si no es así los iniciamos. +# Variables. +OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} +LOGDIR="$OPENGNSYS/log" + + +if ! $(pgrep ogAdmServer >> /dev/null); then + date +"%d/%m/%Y %T ERROR: El servicio ogAdmServer estaba caido, se reinicia" >> $LOGDIR/ogAdmServer.log + /etc/init.d/opengnsys restart +fi +if ! $(pgrep ogAdmRepo >> /dev/null); then + date +"%d/%m/%Y %T ERROR: El servicio opAdmRepo estaba caido, se reinicia" >> $LOGDIR/ogAdmRepo.log + /etc/init.d/opengnsys restart +fi + |