HP Serviceguard Developer's Toolbox Version B.12.00.00 For HP-UX and Linux

;;
esac
}
##################################################################
#
# VALIDATE NOT EMPTY FUNCTION
#
#################################################################
function validate_not_empty
{
if [[ $# < 2 ]]; then
sg_log 0
"$2 value"
sg_log 0 "Usage : notempty VAR VALUE"
sg_log 0 "ERROR: $1 is not defined"
check_return 1 5
else
if [ -z $2 ]; then
sg_log 0 "ERROR: $1 is not defined"
check_return 1 5
fi
fi
}
###############################################
# The function which takes care of returning the exit status to SG.
###############################################
function check_return
{
if (( $1 != 0 ))
then
case $2 in
1) sg_log 0 "ERROR: Function app_start_server: Failed to start"
stop_app_server
exit 1
;;
2) sg_log 0 "ERROR: Function app_stop_server: Failed to stop"
sg_log 0 "WARNING: Make sure to kill all lingering processes of this package"
exit_code=0
;;
3) sg_log 0 "ERROR: Could not Start the Monitor Function"
exit 1
;;
4) sg_log 0 "ERROR: The toolkit configuration file (haapp.conf) does not exist"
exit 1
;;
5) sg_log 0 "ERROR: Validation Failed. Improper parameters in Toolkit Configuration file"
exit 1
;;
*) sg_log 0 "ERROR: Failed, unknown error"
;;
esac
fi
}
#############################################################
#
# START FUNCTION
#
############################################################
function start_function
{
. $APP_TKIT_APP_START
exit_code=$?
}
#############################################################
#
# STOP FUNCTION
#
############################################################
function stop_function
{
. $APP_TKIT_APP_STOP
exit_code=$?
}
#############################################################
#
# MONITOR FUNCTION
#
############################################################
function monitor_function
{
local maintenance=0;
30 MySQL Toolkit scripts