CLOUDSTACK-4601: Add PATH for cron job of check_heartbeat.sh

Also fix a typo in the script template.
This commit is contained in:
Sheng Yang 2013-09-03 16:51:13 -07:00
parent e92d46bfd4
commit 495259132c
2 changed files with 2 additions and 2 deletions

View File

@ -847,7 +847,7 @@ setup_redundant_router() {
crontab -l|grep "check_heartbeat.sh"
if [ $? -ne 0 ]
then
(crontab -l; echo "*/1 * * * * $rrouter_bin_path/check_heartbeat.sh 2>&1 > /dev/null") | crontab
(crontab -l; echo -e "SHELL=/bin/bash\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n*/1 * * * * $rrouter_bin_path/check_heartbeat.sh 2>&1 > /dev/null") | crontab
fi
}

View File

@ -22,7 +22,7 @@ then
lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2)
thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts)
diff=$(($thistime - $lasttime))
if [ $diff -lt 30]
if [ $diff -lt 30 ]
then
echo Keepalived process is dead! >> [RROUTER_LOG]
service keepalived stop >> [RROUTER_LOG] 2>&1