About half a year after my last announcement on Dreambox monitoring system I can announce the new and probably one of my latest versions of Nuki. The version was ready before 2 months but out of laziness where due to debugging things were delayed with the announcement. Has been working on for several days 32 dreambox 500-s and overall the results are very good. The changes are many – the idiotic dependence on Linux server to which to transfer the logs – you already need to have apache + php, because the new system for writing logs is by passing parameters to a php script on the server. I have separately changed the script to work without a server part – if you have a few satellite receivers, it doesn't make sense to have a server running from which to get the info, so you can put the hardcode in the script with 2 variables CAM information. I also declared an additional variable for debug – if you don't want it I won't throw logs at you – again a stupid omission compared to before 🙂 Slight corrections to the code were made, that it looked like it was written by a semi-literate oligophrenic (not that I'm not). They were away from us 2 critical code errors leading to the script crashing at some random moment, again oligophrenic omissions on my part. In general, writing was not very simple, you had to think about doing it like people, that busybox and ash are not the easiest things to tame. This time I think to save the big tirade with the code and directly explain the variables what it is for and what manipulations can be done with it (the new ones) 🙂

SERVER="192.168.100.1"
 STANDALONE="FALSE" #using like stand alone app no server side depends ; )
 HCAM1="" ## if starting like stand alone app give me CAM namezzz if HCAM1 is empty its means chanel is free
 HCAM2="" ## CAM2 name
 PORT="666" # port rockzzz : D : )))))))))))))))))
 IP=$(ifconfig eth0 | grep inet | awk '{print $2}' | sed -e '[email protected]:@@')
 FILE='/tmp/debug'
 INFO='/tmp/info_file'
 NC=$(which nc)
 WGET=$(which wget)
 MAX_DAYS="10"
 TIMEOUT="600"
 MAX=70 #max cpu usage per process
DEBUGING="TRUE" #if u wanna script send debug information set DEBUGING to TRUE if SEVERLESS is set to true this var will be skiped
 NEWDBGSTYLE="TRUE" #debuging new style sending info to apache derectly, old style using nc

So obviously the names of the variables speak for themselves enough, but still I have to say some clever words..

STANDALONE is one of the most important variables if it is set to TRUE no calls to the server will be made and will no longer require server dependency if you use it you have to put values ​​on the following HCAM1 (I don't know why I named her that way, I don't remember anymore, but it doesn't matter). If there is no value in it and the script is independent, the script assumes that it will work on an unencrypted channel and does not check for a decryption module., if there is it will check according to the set value. HCAM2 is optional if your decoder module only uses 1 process let's say CCcam for example.

DEBUGING the second interesting variable will give you information or keep silent depending on what value you have scored. Automatically switches to quiet mode if STANDALONE е TRUE

NEWDBGSTYLE waste is an important variable. It determines how the logs will be transferred to the server. If it is TRUE it will be in the new way without the idiotic dependence on netcat. If you still stick to the old method, put FALSE. Basically, these are the things you need to emphasize, but I think, that the changes, although cardinal, will remain an idea transparent because of the default values ​​🙂

I am definitely already very happy with how things turned out – the script became flexible enough idiots departed dependence on additional files for functions as well as already departed and dependence on nc I think or the need for a server and so on not everyone uses 30+ the box to have a server or it can only have some kind of home router. There is still something to improve but for now I think I should refrain from such things because it is not necessary 🙂

The files are usually found in directory and the crypto for entering logs can be downloaded from here

And in the case of a good script, one accelerated track for all accelerators 😀

Enhanced by Zemanta