You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
561 B
Bash
24 lines
561 B
Bash
#!/bin/sh
|
|
#
|
|
BINDIR=/usr/local/monitoring/princeton
|
|
# Run ksping on a pair of keyservers
|
|
kprimary=$1
|
|
kshadow=$2
|
|
# Check the primary server
|
|
$BINDIR/ksping_linux -q $kprimary.princeton.edu
|
|
RC1=$?
|
|
# Check the shadow server
|
|
$BINDIR/ksping_linux -q -t 1 $kshadow.princeton.edu
|
|
RC2=$?
|
|
if [ '(' $RC1 -eq 3 ')' -o '(' $RC1 -eq 6 ')' -o '(' $RC1 -eq 7 ')' ]
|
|
then
|
|
if [ '(' $RC2 -eq 3 ')' -o '(' $RC2 -eq 6 ')' -o '(' $RC2 -eq 7 ')' ]
|
|
then
|
|
echo "$kprimary and $kshadow Keyservers are BOTH down"
|
|
exit 2
|
|
fi
|
|
else
|
|
echo "Keyservice is up"
|
|
exit 0
|
|
fi
|