Bish bash bosh

So today was all about multi-threading again. Which can lead to all sorts of fun. Basically I’m building render lists in multiple threads and then executing them in order. This in theory is simple, in practice it leads to many hours of thinking and banging your head against the keyboard. By the end of the evening however I’ve almost got it all working. Still lots to do.

Jamie had his ‘Game of Thrones’ lookalike Callum round. He ended up doing Jamie’s make-up, the less said about that the better. They ate at Nando’s, I’ve still never been there.

I had some success with an ebay order, I complained that the tracking number was for someone else. They said it never got dispatched so was going by next-day courier and they were including a quad-copter as well. Bonus.

Went to Pump.

So when I eventually sat down this evening it was time for IP blocking part two. So yesterday I worked out how to get the new ip address as a text file. Tonight’s fun was to try and do something useful with it. So I decided to go for a bash shell script. First thing to do was repeat the grep line to generate the file and called it newip.txt. Then do a check to see if it was zero length, if it was then just exit as we can’t do much. If it contains something then check to see if oldip.txt exists, if not copy new to old. If they both exist then compare new to old, if they are the same then nothing to do. If they are different I then invoke ‘sendmail’ and echo a small file including the new ip address. Finally set this up in crontab. I’ve got this set up on a user level at the moment, but I have a feeling it will need to be changed to root or when I log out it won’t run. Next step is going to be rather more complicated I’m sure.

Leave a Reply

Your email address will not be published. Required fields are marked *