Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Recommend having run-agent.sh force itself into the right directory... #12

Closed
nklein opened this Issue · 5 comments

2 participants

@nklein

I was trying to set up a cron-job to run this script but found I was going to have to make a wrapper script to run from cron or do something else similar because run-agent.sh assumes you're going to run it from the right directory.

I added one line to the beginning of the script that I think should be in the run-agent.sh.sample file:

cd "`dirname $0`"

... Patrick

@avodonosov
Owner

Thanks.

My crontab record is the following (as also show in the agent documentation):

# m h  dom mon dow   command
0 10 * * * cd /home/testgrid/cl-test-grid2/ && ./run-agent.sh

I will consider adding to to run-agent.sh. It would be good then to return to the original directory.

@avodonosov avodonosov closed this issue from a commit
@avodonosov avodonosov close #12 - run-agent.sh.sample ensures the current directory is the …
…one where run-agent.sh is located. Thanks to Patrick Stein.
29cae9a
@avodonosov
Owner

Ah, I forgot the shell script is executed by separate subprocess, so cd doesn't affect the parent.
Added this command, thanks.

@nklein
@nklein
@nklein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.