<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi Dirk,</div>
<div> </div>
<div>interesting to hear about the cmd_import stuff. I just checked my installation but I have no /spider/cmd_import directory. I have a /spider/cmd directory with several Perl scripts in there and some directories but nothing like "import". Do we need to manually create the mentioned directory ?</div>
<div> </div>
<div>BTW: I wrote a bash script long time ago which will download each night at 02 AM the cty.dat from Jims' Server and compare it for changes (if it's newer or not). In case it's newer it will get replaced, else script will quit. Currently I do a dxspider restart after a new cty.dat was found and although it does not hurt because it occurs at 03AM on my local time I would prefer your suggested way by just sending a "load/prefix" to my running node.</div>
<div> </div>
<div>73</div>
<div>Saki, DD5XX</div>
<div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch, 22. Januar 2020 um 23:56 Uhr<br/>
<b>Von:</b> "Dirk Koopman via Dxspider-support" <dxspider-support@tobit.co.uk><br/>
<b>An:</b> dxspider-support@tobit.co.uk<br/>
<b>Cc:</b> "Dirk Koopman" <djk@tobit.co.uk><br/>
<b>Betreff:</b> Re: [Dxspider-support] Prefix data update automation.</div>
<div name="quoted-content">
<div class="moz-cite-prefix"><font size="+1">On 22/01/2020 18:54, Joaquin . via Dxspider-support wrote:</font></div>
<blockquote><font size="+1"><tt><span class="gmail-tlid-translation
gmail-translation"># AutoUpdate CTY.DAT<br/>
0 3 * * 0,2,5 spawn("cd /spider/data; wget -qN <a href="http://www.country-files.com/cty/cty.dat" target="_blank">http://www.country-files.com/cty/cty.dat</a> &")<br/>
0 3 * * 0,2,5 spawn("cd /spider/data; wget -qN <a href="http://www.country-files.com/cty/wpxloc.dat" target="_blank">http://www.country-files.com/cty/wpxloc.dat</a> &")<br/>
0 3 * * 0,2,5 spawn("cd /spider/data; wget -qN <a href="http://www.country-files.com/cty/wpxloc.raw" target="_blank">http://www.country-files.com/cty/wpxloc.raw</a> &")<br/>
2 3 * * 0,2,5 spawn("cd /spider/data; /spider/perl/<a href="http://create_prefix.pl" target="_blank">create_prefix.pl</a>")<br/>
3 3 * * 0,2,5 run_cmd("load/prefix")</span></tt></font></blockquote>
<br/>
<font size="+1"><tt>This is probably the best way to do it. Or you could run the shell script put together in a system cronjob </tt>by Bastien and then in the DXSpider crontab run <span class="gmail-tlid-translation gmail-translation">the 'run_cmd("load/prefix")' command.<br/>
<br/>
The point being that you don't need to restart the node. You can simply reload the prefix file from the command line. You can run commands by dropping a file, containing one or more DXSpider cmds into the cmd_import directory rather than killing the node. Do something like:</span></font><br/>
<br/>
<font size="+1"><span class="gmail-tlid-translation
gmail-translation"><tt>echo "load/prefix" > /spider/cmd_import/reload_prefix</tt></span></font><br/>
<br/>
<font size="+1"><span class="gmail-tlid-translation gmail-translation">and the node will execute that command and then delete the file. If you want to a do a weekly shutdown you can do that in the DXSpider crontab. But Bastien's script could simply do:</span></font><br/>
<br/>
<font size="+1"><span class="gmail-tlid-translation
gmail-translation"><tt>echo "shutdown" > </tt></span></font><span class="gmail-tlid-translation gmail-translation"><span class="gmail-tlid-translation gmail-translation"><font size="+1"><tt>/spider/cmd_import/shutdown</tt></font><br/>
<br/>
<font size="+1">Assuming that you are using a standard installation, then the node will shutdown and then restarted automatically by systemd or init.<br/>
<br/>
73 Dirk G1TLH</font></span></span><br/>
_______________________________________________ Dxspider-support mailing list Dxspider-support@tobit.co.uk <a href="https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support" target="_blank">https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support</a></div>
</div>
</div>
</div></div></body></html>