Running podget on (Open)Solaris

This is just a quick post about an issue I just experienced. I am using the bash script podget for downloading video podcasts automatically to my server, which I then can watch on my TV.

However, as I today swapped out my previous Ubuntu server with a OpenSolaris one, the script no longer worked when being run from cron. It did however work just fine when ran from console.
The error message I've got was:

export: `=': not a valid identifier

And it turned out to be, as so often with cron jobs, the $PATH variable which was not set up properly.

The script uses "sed" for parsing the configuration file, but the tricky bit was that when ran from console, the "sed" used was located in "/usr/gnu/bin/sed" where as when ran from cron, it used "/usr/bin/sed". In (Open)Solaris, there are often several versions of the programs, in an attempt to keep everybody happy, but it makes it a bit harder to troubleshoot these kinds of issues.

The solution was simply to add the following in the beginning of the script (after the first line!):

PATH=/usr/gnu/bin:$PATH

I hope that this may help out anybody experiencing the same issue, as I haven't found anybody else writing about it online.

Comments

Leave a Reply