#!/usr/bin/sh
+# #######################################################################
+# File : /usr/local/scripts/check.smc-agent.sh #
+# Description : script for checking the Sun Management Center Agent #
+# and restarting it, if nessecary #
+# Author : Frank Brehm <brehm@strato.de> #
+# Created : 2005-11-14 #
+# #######################################################################
+
+# $Id$
+# $URL$
+
+RUNFILE=/var/run/smc.agent.run
+LOGFILE=/var/log/check.smc-agent.log
+SS_SCRIPT=/usr/local/scripts/smc.agent
+
+
+if [ -f $RUNFILE ] ; then
+
+ echo "`date`: checking" >>$LOGFILE
+ if [ -x $SS_SCRIPT ] ; then
+ if $SS_SCRIPT status >>$LOGFILE ; then
+ echo "`date`: ok" >>$LOGFILE
+ exit 0
+ else
+ $SS_SCRIPT start >>$LOGFILE 2>&1
+ exit $?
+ fi
+ fi
+fi