mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
e92d46bfd4
commit
495259132c
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user