Chapter 16:
KCS Client Configuration
268
Console Server & RIM Gateway User Manual
# pmpower -l port01 -o 3 cycle
(The RPC is on serial port 1. The telecom device is powered by RPC outlet 3)
We can now append this command to our custom script. This will guarantee that our telecom device will be power cycled
every time the console reads the "EMERGENCY" character stream on port 2.
15.1.4 Example script - Multiple email notifications on each alert
If you desire to send more than one email when an alert triggers, you have to create a replacement script using the
method described above and add the appropriate lines to your new script.
Currently, there is a script
/etc/scripts/alert-email
which gets run from within all the alert scripts (e.g.
portmanager-user-
alert or environmental-alert
). The alert-email script is responsible for sending the email. The line which invokes the email
script looks as follows:
/bin/sh /etc/scripts/alert-email $suffix &
If you wish to send another email to a single address or the same email to many recipients, edit the custom script
appropriately. You can follow the examples in any of the seven alert scripts listed above. In particular let
’s consider the
portmanager-user-alert
script. If you need to send the same alert email to more than one email address, find the lines in
the script responsible for invoking the alert-email script, then add the following lines below the existing lines:
export TOADDR="[email protected]"
/bin/sh /etc/scripts/alert-email $suffix &
These two lines assign a new email address to TOADDR and invoke the alert-email script in the background.
15.1.5 Deleting configuration values from the CLI
The
delete-node
script is provided to help with deleting nodes from the command line. The
"delete-node"
script takes one
argument, the node name you want to delete (e.g.
"config.users.user1"
or
"config.sdt.hosts.host1"
).
So
delete-node
is a general script for deleting any node you desire (users, groups, hosts, UPS's etc) from the command
line. The script deletes the specified node and shuffles the remainder of the node values.
For example if we have five users configured and we use the script to delete user 3, then user 4 will become user 3, and
user 5 will become user 4.
This creates an obvious complication as this script does NOT check for any other dependencies that the node being
deleted may have had. So you are responsible for making sure that any references and dependencies connected to the
deleted node are removed or corrected in the config.xml file.
The script treats all nodes the same. The syntax to run the script is
# ./delete-node {node name}
so to remove user 3:
# ./delete-node config.users.user3
The
delete-node
script
#!/bin/bash
#User must provide the node to be removed. e.g. "config.users.user1"
# Usage: delete-node {full node path}
if [ $# != 1 ]
then
echo "Wrong number of arguments"
echo "Usage: delnode {full '.' delimited node path}"
exit 2
fi
# test for spaces
TEMP=`echo "$1" | sed 's/.* .*/N/'`
if [ "$TEMP" = "N" ]
then
Summary of Contents for ACM5000
Page 3: ......
Page 10: ...Table of Contents 10 Console Server RIM Gateway User Manual...
Page 11: ......
Page 94: ...Chapter 5 Firewall Failover and Out of Band 94 Console Server RIM Gateway User Manual...
Page 119: ......
Page 149: ......
Page 191: ......
Page 205: ......
Page 225: ......
Page 303: ......
Page 313: ......
Page 323: ......