The most- I finally managed to finish my work on the script I've been writing for so long 🙂 Already NUKI is one quite a stable script. I emphasize 1 because I removed the additional script by embedding it in the main one. It has already acquired a monolithic structure, but personally I think it's better for a demon option 🙂 There aren't many improvements anymore, rather, they are fixes for various minor bugs and attempts to improve the code. The only noticeable thing I've added is a check on the receiver's uptime. I have set it for everyone 10 days to restart alone.

Looking back and my original idea for a script that just tracks the receivers what happens to them I think, that I have quite well realized my idea many times. The only glitch I hope to avoid with 10 the daily restart is – there are times when the receiver starts to reboot, but fails. It kills most services, including the network one, but fails to restart. Unfortunately, due to the restrictions imposed on me by the boxes, I could not make the restart be from the kernel and thus avoid this moment.. Maybe some day in the future I will compile my image for the boxes and thus I will be able to deal with this problem.. For now, I hope my last decision is to blur it 🙂 Otherwise, everything else turned out extremely well, even much better than I originally intended. Especially in a situation, that imitated through so many metamorphoses. The most buggy part remained the web interface, so I still don't give it 😆 after I sit down to rewrite it these days I'll upload it for free consumption. Final words – instead of procrastinating I just want to thank all my friends, that they tolerated my stupid questions about this and that – you have an important contribution to the code design. The person to whom the project is named deserves gratitude and served as an inspiration for me in most moments of incompetent writing 🙂 … I deserve it!

Today I worked a little on the new NUKI versions. Finally, I brought order to her, and I want to fix it just before I release the last stable one, probably the final version. So I had the idea to check how many days is uptime on the receiver, that most of me have problems after being around for a long time, so I decided to do through 10 days a prophylactic restart. I quickly drew a conveyor to clear my days of other variables because the result of the uptime command is quite unpleasant to work with.

# uptime
12:13:57 up 30 days, 20:07,  1 user,  load average: 0.00, 0.00, 0.00

So the order in question is filtered only by the super conveyor 😛

uptime | awk -F'up' '{ print $2 }' | awk -F'days' '{ print $1 }'

As if working hours are days the result is an integer with days, and if it is hours the result is similar to

[email protected]:~$ uptime | awk -F'up' '{ print $2 }' | awk -F'days' '{ print $1 }'
1:34,  5 users,  load average: 0.46, 0.39, 0.41
[email protected]:~$

Because of which goes through a check for the type of value

if echo $days | grep "^[0-9]*$" > /tmp/null
   echo "Uptime in days is $days"
  echo "Uptime isnt in days"

Simply easily and clearly in the if the construction checks whether the value contains only digits with a regular expression grep “^[0-9]*$”.

The most- then I had to fix the last touches around my modest project NUKI 🙂 In general, there are a hell of a lot of changes where obvious where not, but it was definitely quite a useful upgrade on all scripts and I even had to add 2 new that I migrate from flat files to databases 😉 I also made one changelog file, that I'm old age I'm not happy when I forget what 😉 The file is encoded UTF-8, to know in case you open it through the browser 😉 Enough nonsense, let me introduce the changes 😆

Improved functionality for logs:
1. Due to the inaccuracy in time of most receivers, the server time is taken
2. More info – reason to restart the receiver
The client part receives parameters for whether the channel is encrypted, if it is encrypted and there is no necessary service, the receiver is restarted. If not, a restart is not required.(future fixation)
The server part passes arguments

In general, the logging stuff was very buggy, I got a receiver with its date and time and it was definitely a problem for me., so I decided that it is more reasonable for a date to come from the server that I have attached to the NTP server 😉 The log system is made to distinguish my restarts and so on, I'm a curious kid, it's good to know 😉 the receiver that I have previously compiled from the database 😉 Well, in general and not so general lines is this

Some time ago I mentioned to you that we will start the Escom cable TV project and in general we have started 🙂 We are already in the final rights in my city through the mass hooking of subscribers and so on. Today I had to revive a dead dream box 🙂 if you were dealing with satellite TV or such receivers there is no way you do not know Dream-Multimedia-Tv 😉 за сателитни приемници ползваме модела dreambox 500s overall a good receiver small in size with a dvb tuner output to hook up more devices after it. With LAN card remote and web interface for remote control and card reader and most importantly with Linux firmware… what more does a person need. Отделно че е предпочитан от сателитните пирати заради лесния шаринг на ключове 😉 Та стига празни приказки да пристъпя към същинката. I go to the office and watch one channel dead I believe in the web interface there is no connection on the lan too sux 😆 I restart the receiver I wait around 2 min there are none, I hang up directly for him again there are still no sux twice! I download it and decide to try if I can restore it through its COM port 😉 first I hooked up directly to see if there is hope for it with bitrate 9600 and oh the world, the symbols of the snipe came out super, so boot rum is not dead. I pulled away DreamUP a wonderful program for restoring sleeping boxes 😉 😈 Interface and is a super simple you have in common 4 бутона и 2 the choice whether to hook up to lan and or serial port and from there you have the opportunity to flash and delete the old flash. First I let it flash, I did it many times and I know that the old flash is deleted and then the new one is overwritten.. Everything became normal. But the box never came to life%&77!$&^!&*!%@ $ pretty quick words to the manufacturers. Then I call her to swear to delete the flash and then to flash again and I see that when I let her rub the flash drive and she started to rub a lot more things except the boot rum.. Super Maya will get up then flash again and oh heavens the wizard has started for the initial launch of dreambox. From there, everything is banal. The important thing was that there were oily settings because of which it did not start, a separate question is how it anointed them and so on, but this is a mystery that I can not understand 🙂