removed domain-specific info from scripts

This commit is contained in:
Russ Long 2015-03-30 19:26:18 -04:00
parent f570318edc
commit 031a43c717
2 changed files with 13 additions and 13 deletions

View File

@ -3,8 +3,8 @@
#2.0.0
#rewrite by rlong
LOGDIR="/usr/local/lp/logs"
TMPFILE="/usr/local/lp/temp/swapwatch.results"
LOGDIR="/usr/local/sw/logs"
TMPFILE="/usr/local/sw/temp/swapwatch.results"
#Create and clear TMPFILE
touch $TMPFILE
@ -33,7 +33,7 @@ else
then
loadthreshold=5
swapthreshold=524288
contact="support@liquidweb.com"
contact="support@DOMAIN.com"
fi
#check if we should run. either can trigger it
@ -69,7 +69,7 @@ else
echo "" >> $TMPFILE
echo "Process List" >> $TMPFILE
echo "" >> $TMPFILE
/bin/ps faux >> $TMPFILE 2>&1
/bin/ps faux >> $TMPFILE 2>&1
echo "" >> $TMPFILE
echo "" >> $TMPFILE
echo "Processes sorted by RESIDENT memory" >> $TMPFILE
@ -80,7 +80,7 @@ else
#Send the email to the $contact address
subject="[LW] Swapwatch.sh on $(hostname)"
contents=$(cat $TMPFILE)
contents=$(cat $TMPFILE)
/usr/sbin/sendmail "$contact" <<EOF
subject:$subject

View File

@ -3,11 +3,11 @@
###############################################################################
APPDIR="/usr/local/lp/apps/swapwatch"
LOGDIR="/usr/local/lp/logs"
CONFDIR="/usr/local/lp/configs/swapwatch"
swapurl="http://layer3.liquidweb.com/monitoring/swapwatch.sh" #this will be appserv or nagilink
updateurl="http://layer3.liquidweb.com/monitoring/swapupdate.sh" #this will be appserv or nagilink
APPDIR="/usr/local/sw/apps/swapwatch"
LOGDIR="/usr/local/sw/logs"
CONFDIR="/usr/local/sw/configs/swapwatch"
swapurl="http://DOMAIN.COM/swapwatch.sh" #this will be appserv or nagilink
updateurl="http://DOMAIN.com/swapupdate.sh" #this will be appserv or nagilink
###############################################################################
@ -25,12 +25,12 @@ loadthresh=$( expr $cpus \* 5 )
#memory is: 2G thresh for 7+, 1G for 2+, .5G for less than that
G=1048576 #your a gigabyte
if [ $memory -gt $( expr 7 \* $G ) ]
then
then
swapthresh=$( expr 2 \* $G )
elif [ $memory -gt $( expr 2 \* $G ) ]
then
then
swapthresh=$G
else
else
swapthresh=$( expr $G / 2 )
fi