[Dxspider-support] New build, things not working from within crontab

Joaquin joaquin at cronux.net
Mon Dec 5 20:00:11 GMT 2022


Keith,

Try doing this:

su - sysop -c "cd /home/sysop"
su - sysop -c "chown -R sysop.spider spider"
su - sysop -c "find ./ -type d -exec chmod 2775 {} \;"
su - sysop -c "find ./ -type f -exec chmod 775 {} \;"

I don't have '&&' I use ';'. Look at my crontab:


# AutoUpdate USDB
0 1 * * 1,3,5 spawn("cd /tmp; wget -qN ftp://ftp.w1nr.net/usdbraw.gz; 
/spider/perl/create_usdb.pl usdbraw.gz")
5 1 * * 1,3,5 run_cmd("load/usdb")
10 1 * * 1,3,5 spawn("rm /tmp/usdbraw.gz")

# AutoUpdate CTY.DAT
0 3 * * 0,2,5 spawn("cd /spider/local_data; wget -qN 
http://www.country-files.com/cty/cty.dat")
0 3 * * 0,2,5 spawn("cd /spider/local_data; wget -qN 
http://www.country-files.com/cty/wpxloc.raw")
2 3 * * 0,2,5 spawn("/spider/perl/create_prefix.pl")
3 3 * * 0,2,5 run_cmd("load/prefix")

# AutoUpdate Keps
0 2 * * 2,4,6 spawn("cd /tmp; wget -qN 
http://www.amsat.org/amsat/ftp/keps/current/nasabare.txt; 
/spider/perl/convkeps.pl -p nasabare.txt")
5 2 * * 2,4,6 run_cmd("load/keps")
10 2 * * 2,4,6 spawn("rm /tmp/nasabare.txt")

Kin EA3CV


El 05/12/2022 a las 20:44, Keith Maton via Dxspider-support escribió:
> Right, I’ve spent two days with this and I’m now pulling out what 
> little hair I have left.
>
> I’ve built a new cluster and I’m trying to get (to start with), my FCC 
> database updated via crontab.
>
> I’ve added sysop into the SUDO group.
>
> I’m running a Raspberry Pi with DXSpider v1.57 (build 451).
>
> I’m logged onto the Pi as sysop, then I’ve done a sudo su because 
> otherwise I can’t write to /spider/local_cmd
>
> My crontab file is thus:
>
>
> # Check every 10 minutes to see if xxxx is connected and if not
>
> # start a connect job
>
> 0,10,20,30,40,50 * * * * start_connect('pi4cc') unless connected('pi4cc')
>
>
>
> # Monday 01:00 - Get latest FCC data (W1NR updates Sundays)
>
> 16 16 * * 1 spawn("cd /tmp && wget -qN ftp://ftp.w1nr.net/usdbraw.gz 
> && /spider/perl/create_usdb.pl usdbraw.gz")
>
> 20 16 * * 1 run_cmd("load/usdb")
>
> 25 16 * * 1 spawn("rm /tmp/usdbraw.gz")
>
>
>
> The connect lines are fine, that works perfectly.
>
> The first line of getting the FCC data partly works.  cd /tmp works 
> and so does the wget command.  However, the final part doesn’t work. 
>  It never creates /spider/local_data/usdb.v1
> The third line works, it deletes the downloaded file.
>
> However, if I run cd /tmp && wget -qN ftp://ftp.w1nr.net/usdbraw.gz && 
> /spider/perl/create_usdb.pl usdbraw.gz from the prompt, it works 
> (although the file it creates has the wrong owner).
>
> To me, this looks like a permissions/ownership thing but I’ve tried so 
> many things today and yesterday that I’ve kinda lost the will to live.
>
> These are the permissions on my crontab file in /spider/local_cmd
>
> -rwxr-xr-x 1 root spider 2020 Dec 5 12:16 crontab
>
> I also have stuff in crontab to update keps and cty.dat which don’t 
> work either but I reckon that if I can get this one working, the 
> others will work as well.
>
> I’m quite sure this is going to be something simple but I’ve stared at 
> it for so long now that I need to refer to Dirk’s list of pre-reqs for 
> the mojo upgrade, ie a supply of good, strong tea - preferably in pint 
> mugs. A tin hat, stout boots, a rucksack with survival rations and a 
> decent miners' lamp might also prove comforting.
>
> Please, can someone point me in the right direction.
>
> Thanks,
>
> 73 Keith G6NHU
>
>
> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at tobit.co.uk
> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20221205/0926e2c2/attachment-0001.htm>


More information about the Dxspider-support mailing list