Skip to content

Commit 4952591

Browse files
author
Sheng Yang
committed
CLOUDSTACK-4601: Add PATH for cron job of check_heartbeat.sh
Also fix a typo in the script template.
1 parent e92d46b commit 4952591

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

patches/systemvm/debian/config/etc/init.d/cloud-early-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ setup_redundant_router() {
847847
crontab -l|grep "check_heartbeat.sh"
848848
if [ $? -ne 0 ]
849849
then
850-
(crontab -l; echo "*/1 * * * * $rrouter_bin_path/check_heartbeat.sh 2>&1 > /dev/null") | crontab
850+
(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
851851
fi
852852
}
853853

patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ then
2222
lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2)
2323
thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts)
2424
diff=$(($thistime - $lasttime))
25-
if [ $diff -lt 30]
25+
if [ $diff -lt 30 ]
2626
then
2727
echo Keepalived process is dead! >> [RROUTER_LOG]
2828
service keepalived stop >> [RROUTER_LOG] 2>&1

0 commit comments

Comments
 (0)