<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto"><span style="font-family:Arial;font-size: 16px">All,</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">Over the last couple of days, I’ve had two partner sysops say that they’re not running the latest version of dxspider and in each case, I’ve been able to give them a couple of commands to add to their crontab to keep their node updated.   </span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">I know this has been mentioned before but not for a while so I thought I’d share the details again.</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">Log in to your node and edit crontab.  You may (or may not) need sudo at the start depending on how you’re logged in.</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="color:#000000;font-family:Courier New">sudo nano /spider/local_cmd/crontab</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">Add the following lines:</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Courier New"># Force update Kin's update utilities each night prior to update</span><br />
<span style="font-family:Courier New">30 22 * * * spawn('cd /spider/local_cmd; wget -q https://raw.githubusercontent.com/EA3CV/dxspider_info/main/check_build.pl -O /spider/local_cmd/check_build.pl')</span><br />
<span style="font-family:Courier New">32 22 * * * spawn('cd /spider/local_cmd; wget -q https://raw.githubusercontent.com/EA3CV/dxspider_info/main/undo_newbuild.pl -O /spider/local_cmd/undo_newbuild.pl')</span><br />
<span style="font-family:Courier New">35 22 * * * run_cmd('load/cmd')</span><br />
<br />
<span style="font-family:Courier New"># Check for updates on weekdays at 22:40 and 01:07, avoiding contest times at weekends</span><br />
<span style="font-family:Courier New">40 22 * * 1,2,3,4,5 run_cmd("check_build Y 5")</span><br />
<span style="font-family:Courier New">07 01 * * 1,2,3,4,5 run_cmd("check_build Y 5")</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">You may want to adjust the times slightly because apart from anything else, we don’t want every node updating at exactly the same time when there’s an update.</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">I have my crontab set to local time rather than UTC.</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">This is using the excellent script provided by Kin.  At 22:30 and 22:32, it grabs a fresh copy of the two scripts from Github in case Kin has made any changes.  There are two scripts, check_build which does the actual update and undo_newbuild which can roll back if needed.</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">Then at 22:40 each weekday night and 01:07 each weekday morning, the script runs which checks for a dxspider update.  If there is one available, it first takes a backup before updating.  Up to five backups will be kept.  The node is only restarted if an update is applied and it’s only down for a fraction of a second.</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: 16px">I hope this is useful.</span><span style="font-size: 16px"><br /></span><span style="font-size: 16px"><br /></span><span style="font-family:Arial;font-size: medium">73 Keith G6NHU</span></div>
</div>
</body>
</html>