Skip to content

Commit

Permalink
Fixes #9858: When upgrading Rudder, we get mails from cron saying \"o…
Browse files Browse the repository at this point in the history
…k: Rudder agent check ran without errors.\"
  • Loading branch information
peckpeck committed Dec 28, 2016
1 parent 2b11736 commit 5169f53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rudder-agent/SOURCES/rudder-agent-postinst
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ fi

# Add temporary cron for checking UUID. This cron is created in postinst
# in order to remove it later without complains of the package manager.
CHECK_RUDDER_AGENT_CRON=`grep "/opt/rudder/bin/check-rudder-agent" /etc/cron.d/rudder-agent | wc -l`
CHECK_RUDDER_AGENT_CRON=`grep -E "agent check|check-rudder-agent" /etc/cron.d/rudder-agent | wc -l`
TMP_CRON=/etc/cron.d/rudder-agent-uuid
# Add it only if the default cron file does not call check-rudder-agent script
if [ ${CHECK_RUDDER_AGENT_CRON} -eq 0 ]; then
if [ ! -f ${TMP_CRON} ]; then
echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * * root ${RUDDER_CMD} agent check" > ${TMP_CRON}
echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * * root ${RUDDER_CMD} agent check > /dev/null" > ${TMP_CRON}
fi
fi

Expand Down

0 comments on commit 5169f53

Please sign in to comment.