Defining the PATROL Agent as a member of the package
This section explains how to add the PATROL Agent service to the cluster application's control script for a package. This task is commonly referred to as binding the agent to the cluster application.
Make the following additions to the customer_defined_run_cmds:
# Start of user-defined functions.
function customer_defined_run_cmds
{
# Add customer defined run commands.
# PATROL Start command (substitute correct path
# and port).
\\ \\ su patrol -c "/opt/PATROL3.4/PatrolAgent -p 3939"
# End of Patrol Start command.
test_return 51}}
}
function customer_defined_run_cmds
{
# Add customer defined run commands.
# PATROL Start command (substitute correct path
# and port).
\\ \\ su patrol -c "/opt/PATROL3.4/PatrolAgent -p 3939"
# End of Patrol Start command.
test_return 51}}
}
Make the following additions to the customer_defined_halt_cmds:
function customer_defined_run_cmds
{
# Add customer defined halt commands.
# PATROL halt command (substitute correct path
# and port).
PID=$ (ps -ef|awk '$NF=="3939" \{ print $2\}')
if\[[ -n $PID ]]
then
kill -TERM $PID
fi
# End of Patrol Start command.
test_return 52
}
{
# Add customer defined halt commands.
# PATROL halt command (substitute correct path
# and port).
PID=$ (ps -ef|awk '$NF=="3939" \{ print $2\}')
if\[[ -n $PID ]]
then
kill -TERM $PID
fi
# End of Patrol Start command.
test_return 52
}
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*