dradio
dradio copied to clipboard
using "at" doesn't work
Maybe I'm doing something wrong, but I tried using "at" just as it is explained in the script file: "at 12:35" and then "/usr/local/bin/dradio dlf 1 test", followed by CTRL-D. But there is no file created. Nothing has happened. However, using dradio directly on the command line works! Do you have any idea what's going wrong here?
Having had a closer look, I think the problem is the terminal test (line 153). Without this test (that is, assuming that it's always true), the scripts runs with "at" properly. Since I'm not very experienced with shell script programming, I don't know what this terminal test is used for...
hey, you are right. I want to add a nice feature, but forgot to document it and didn't think aout the implications. wth line 153 you can us it this way:
/usr/local/bin/dradio dlf 1 test | at 12:34
then it will add
streamripper http://dradio.ic.llnwd.net/stream/dradio_dlf_m_a -d ~/media/tmp/ -s -a "dlf-%d-test" -l 60 -u "Microsoft-WebDAV-MiniRedir/6.1.7600" -A -i --quiet
to the at-schedule
Advantage: easier syntax with at
Disadvantage: if you change later the dradio.config the scheduled streamripper command will still run with the old settings (URLs, Target...) and there will be no check, if enough space is left.
I really need to implement getopts, so we could have flexible command line options.
Thanks for reporting this bug.
Thanks for your quick response and for your useful script.