Created
February 3, 2013 04:45
-
-
Save ThomasWunderlich/4700571 to your computer and use it in GitHub Desktop.
So you want to use gsutil in your crons but running into problems? Here's the solution:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The most likely reason is that cron runs in a very limited environment and doesn't have access to gsutil or to gsutil's configuration.To fix this you should set your Path variable and the gsutil configuration inside your script like so: | |
#!/bin/bash | |
PATH=path/to/gsutil | |
export BOTO_CONFIG="/path/to/.boto" | |
#rest of script here | |
To get the Path type these commands in your shell | |
echo $PATH | |
gsutil -D ls 2>&1 | grep config_file_list | |
Then just copy those to your path/to/gsutil and export BOTO_CONFIG lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks.