dradio icon indicating copy to clipboard operation
dradio copied to clipboard

using "at" doesn't work

Open beedaddy opened this issue 12 years ago • 3 comments

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?

beedaddy avatar Jan 14 '13 12:01 beedaddy

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...

beedaddy avatar Jan 15 '13 09:01 beedaddy

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.

prometoys avatar Jan 15 '13 16:01 prometoys

Thanks for your quick response and for your useful script.

beedaddy avatar Jan 15 '13 19:01 beedaddy