Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17914

Cronjob debugging

$
0
0

Guys/Gals,

Here's a cronjob that I wrote:

5 23 * * * root [ "/bin/ps -ef | grep stor_agent | grep -v grep" != " " ] && "/sbin/service stor_agent stop;/sbin/chkconfig stor_agent off"

What I am hoping that it will do is to check that the stor_agent daemon is running, and if it is, will stop the agent and make sure that it isn't set to run at boot time. However, there seems to be an issue with it and it is running even if the check condition isn't met. Ideas?

submitted by pupp3t33r
[link][25 comments]

Viewing all articles
Browse latest Browse all 17914

Trending Articles