mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4601: Add PATH for cron job of check_heartbeat.sh
Also fix a typo in the script template.
This commit is contained in:
parent
3dc8b8863a
commit
8451d35324
|
|
@ -848,7 +848,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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue