PDA

View Full Version : Bouquets downloadable via Plugin or Script



SGTFlipFlop
26th January, 2011, 02:47 AM
Is it possible too write a separate Plugin / Script to automatically download the up-to-date bouquets same way as we download the EPG for example if the bouquets are hosted at a private HTTP site?


I've no experience writing Scripts / Plugins but just wanted to know if it is possible.


Anyone done something similar or know how to let me know


Thanks for reading

jfish
26th January, 2011, 10:43 AM
Is it possible too write a separate Plugin / Script to automatically download the up-to-date bouquets same way as we download the EPG for example if the bouquets are hosted at a private HTTP site?


I've no experience writing Scripts / Plugins but just wanted to know if it is possible.


Anyone done something similar or know how to let me know


Thanks for reading

I do Linux scripting, so shouldnt be difficult to use some kind of HTTP GET function to download the files and them move them to the correct location for the bouquets and run script using CRON say once a week.

SGTFlipFlop
26th January, 2011, 01:30 PM
That sounds good, That is exactly what I was thinking about. I had a look at making it myself but have no knowledge in this side of things

lincsat
26th January, 2011, 02:03 PM
You can write it into rcS or init to download on boot. You can get a tarball hosted somewhere, then wget the tarball, gunzip and move files to the correct folder - you just have to keep the tarball up to date. It does work :)

jfish
26th January, 2011, 05:55 PM
a very quick and dirty script I have written in a few minutes . obviously will need to do more work to check from existance of file and other error checking.

Basically the file is downloaded to the tmp folder, and unzipped to the correct folder where the boquets are stored.

THIS HAS NOT BEEN TESTED


#/bin/bash
cd /tmp
wget "http://somewebsite.com/boquets.tar.gz"
tar xzf aboquets.tar.gz -C somedir/

markj113
26th January, 2011, 08:37 PM
the only problem then would be the regional channels like bbc 1, bbc 2 and itv.

Unless you stored different versions on the server like an english, welsh and irish one?

jfish
26th January, 2011, 09:06 PM
the only problem then would be the regional channels like bbc 1, bbc 2 and itv.

Unless you stored different versions on the server like an english, welsh and irish one?

only way is to have some flag file say in the var/etc folder like eng or wel or ir - and the script can parse the file and determine with region you want to download.

tw87
27th January, 2011, 10:36 AM
Glad your asking this mate as I asked on other forums and was told can't be done. Also asked here and was basically flamed because I also asked here as well as the other forum.

Hope it can be done as your bouquet sets are the best.

jfish
27th January, 2011, 02:17 PM
I will have time this weekend so develop this script on my Linux machine at home and then run it on my DM500S and see what happens .. will use my internal web server to download from as a test.

SGTFlipFlop
28th January, 2011, 06:11 PM
I will have time this weekend so develop this script on my Linux machine at home and then run it on my DM500S and see what happens .. will use my internal web server to download from as a test.

Much appreciated mate for the work

jfish
2nd February, 2011, 04:47 PM
an update

over the weekend the little time I had (I was on call) I did write the script and did some testing and all were successful.

just need to clean it up a bit, especially the last stage of reloading the updates channels list ... at the moment the box has to be rebooted.. will post script later on .. but the script downloads from my internal web server so who ever wants to test script will have to modify it to download from an alternative web server.

jfish
6th February, 2011, 01:33 AM
as promised the script




#!/bin/sh
# script to download latest channels lists
# Tested on Enigma 1 images (DM500s)
# Jfish 1 Feb 2011


cd /tmp/
mkdir bq
cd bq
wget "http://192.168.1.10/bq.tar.gz"
chmod 755 /tmp/bq/bq.tar.gz
tar -xzvf bq.tar.gz

rm -rf /var/etc/satellites.xml
mv /tmp/bq/satellites.xml /var/etc/
rm -rf /tmp/bq/satellite.xml

cd /var/tuxbox/config/enigma/
rm -rf *.tv
rm -rf *.radio
rm -rf *.epl
rm -rf bouquets
rm -rf services
rm -rf services.locked

mv /tmp/bq/* /var/tuxbox/config/enigma/
rm -rf /tmp/bq.tar.gz
rm -rf /tmp/bq

wget -qO - http://root:dreambox@127.0.0.1/cgi-bin/reloadSettings
wget -qO - http://root:dreambox@127.0.0.1/cgi-bin/reloadUserBouquets
reboot



couple of points

The web server 192.168.1.10 is my internal web server, this will need to be changed

The above was tested on a DM500S using Pli Jade 3 - should run on other Images - the above script wont run on Enigma 2 images

the tar.gz file is named bq.tar.gz. If creating the file on a Windows box use IZArc - create as Zip file first and then convert to a tar.gz file

The box gets rebooted at the end of script

save script as an sh file (channelreload.sh) and copy it to var/bin (may be different on other images)

use cron to schedule this to be executed once a day - I have not tested this as yet

to run it say every tuesday at 2am in the morning the cron command is

crontab 0 2 * * 2 /var/bin/channelreload.sh

The command for cron is

# Minute Hour Day of Month Month Day of Week Command

so you can change the schedule

to check for what is scheduled type crontab -l

jfish
7th February, 2011, 12:14 AM
see attache file

by default on the PLi Jade image - cron doesnt start as default, to do so, goto settings, hardware settings and then to services and select cron to start

once txt file is downloaded, rename extenstion to sh and upload to DM

SGTFlipFlop
7th February, 2011, 12:16 AM
Had a quick look at it earlier, Does the cron on Pli image need to be started via telnet?

jfish
7th February, 2011, 08:45 AM
Had a quick look at it earlier, Does the cron on Pli image need to be started via telnet?

no you do it thru interface

RuberDuck
7th February, 2011, 11:21 AM
one of the guys posted his own script to do just this a while ago.

check this thread.

http://www.dreamboxuk.com/forums/showthread.php?1831-Script-to-Auto-Update-Bouquets-online.&highlight=script

also check this thread

http://www.dreamboxuk.com/forums/showthread.php?2239-Enigma1-Bouquet-Update-Plugin&p=9939#post9939

RuberDuck
7th February, 2011, 11:11 PM
ok first off i am not the author of this plugin, that honour goes to rossi2000 of DBUK. also i am posting this here in the DREAMBOX section but it will work with any E2 system.

if you have any questions ask in a separate thread and reference this one and i will gladly pass them on for you. i will also keep this thread updated with future updates etc.

==================================================


Enigma2 Bouquet & Picon Update Plugin

thanks to silverfox and google for the assistance

transfer the attached file to /tmp/ and manuallly install it.

the ipk will automatically reboot your box after installation, it will now appear in the plugins menu (green button)

edit the .sh script in /usr/lib/enigma2/python/plugins/systemplugins/E2_Bouquet_Picon_Update with your file locations


enjoy

================

RuberDuck
8th February, 2011, 08:55 PM
Enigma2 Bouquet & Picon Update Plugin

thanks to silverfox and google http://1.2.3.11/bmi/www.dreamboxuk.com/forums/images/smilies/smile.png for the assistance

transfer the attached file to /tmp/ and manuallly install it.

the ipk will automatically reboot your box after installation, it will now appear in the plugins menu (green button)

this ipk will check if youve installed the previous version, if so, it will remove it and re-install the plugin and place a new script in /usr/script. if not, it will install as normal.

edit the .sh script in /usr/script with your file locations

UPDATED 08022011:-
cleaned the plugin directory of unneeded files, altered some code.
the script has now been moved to /usr/script, any script updates can be applied to this file, no need to re-install the plugin.
log file of bouquet updates created in /var/log



enjoy

girovend
8th February, 2011, 08:57 PM
Anything for enigma 1 yet

reddevil157
8th February, 2011, 09:01 PM
Hey lads, could you elaborate for the not so technical minded, from the, edit the .sh part plz.

RuberDuck
8th February, 2011, 09:02 PM
Anything for enigma 1 yet

yes this.

-------------

Enigma1 Bouquet Update Plugin


this is easier to run the script, rather than having to go into the script panel.
it will appear in the plugins menu instead now.

transfer both files into /var/tuxbox/plugins
chmod the .sh script to 755

now in the yellow button you will see Enigma1 Bouquet Update. click it to update bouquets http://1.2.3.11/bmi/www.dreamboxuk.com/forums/images/smilies/smile.png
remember to edit your http file location in the .sh file.

RuberDuck
8th February, 2011, 09:06 PM
Hey lads, could you elaborate for the not so technical minded, from the, edit the .sh part plz.

open the .sh file with windows nopepad and look for this



#Change the URL to point to your Bouquet zip file
BQ="http://www.xxxx.co.uk/xxxx/enigma1.tar.gz
change the url to the address where your hosting your .tar archive.

jfish
8th February, 2011, 11:08 PM
I have updated the script

no point in checking say everyday and downloading the same channels list, so a version check is done to confirm.

The version check is a text file on the remote server with a number for version (incremental integer value) and also a local version on the dreambox.

The script will download the version file from the remote server, check to see if the server version is higher than the local version and then only run the update script.

as a test, the local version is 1 and the server version is 2 - thus it will pull down the latest update and also copy the new version file to /var/etc

The version file is stored in /var/etc and must exist in order for the script to update. Hopefully further updates will include check for file to see if it exists and if not, then perform an initial channel refresh.


#!/bin/sh
# script to download latest channels lists
# Tested on Enigma 1 images (DM500s)
# Jfish 1 Feb 2011
# change log
# v1 - initial release (1 Feb 2011)
# v1.1 - remove of reboot at the end of script - no need for it now (6 Feb 2011)
# v1.2 - check for version update and only update if new version exists

cd /tmp
wget "http://192.168.1.10/remotever.txt"
localv=`cat /var/etc/ver.txt`
remotev=`cat /tmp/remotever.txt`

if [ $remotev -gt $localv ]; then

cd /tmp
mkdir bq
cd bq
wget "http://192.168.1.10/bq.tar.gz"
chmod 755 /tmp/bq/bq.tar.gz
tar -xzvf bq.tar.gz

rm -rf /var/etc/satellites.xml
mv /tmp/bq/satellites.xml /var/etc/
rm -rf /tmp/bq/satellite.xml

cd /var/tuxbox/config/enigma/
rm -rf *.tv
rm -rf *.epl
rm -rf *.radio
rm -rf bouquets
rm -rf services
rm -rf services.locked

mv /tmp/bq/* /var/tuxbox/config/enigma/
rm -rf /tmp/bq.tar.gz
rm -rf /tmp/bq

wget -qO - http://root:dreambox@127.0.0.1/cgi-bin/reloadSettings
wget -qO - http://root:dreambox@127.0.0.1/cgi-bin/reloadUserBouquets
rm -rf /var/etc/ver.txt
mv /tmp/remotever.txt /var/etc/ver.txt
else
exit;
fi

rossi2000
9th February, 2011, 07:07 PM
nice way to check if downloads needed jfish, thx :)

SGTFlipFlop
10th February, 2011, 02:20 PM
Can you show an example how the txt files look please?

jfish
10th February, 2011, 05:47 PM
Can you show an example how the txt files look please?

the version text file (which is what one assumes you mean) will have a number for example

1

or

2

or

25

jfish
13th February, 2011, 05:14 PM
another update done

change log

- functions added in code to make it easer to read and it goods programming practice

- A check for local version file is done initially, if it doesnt exist - then get a copy of the channels list is downloaded and copy version file over from server to local directory. If local version file does exist, then check to see if a a more up to date copy exist on the server if it doest download and copy it otherwise do nothing

here is the logic of the script...

lets start by checking for local version file (/var/etc/ver.txt)
if it doesnt exist then
download channel and boquets and copy over to dreambox
copy version file over to /var/etc
exit as nothing else to do really

but if local version file exist then
if remote server version file is more recent than the local copy then
download channel and boquets and copy over to dreambox
copy version file over to /var/etc
exit as nothing else to do really

if both version files are same then
exist as nothing to do really

SGTFlipFlop
13th February, 2011, 06:14 PM
See 3 people downloaded it without saying thanks, Bad patter.

Excellent work again jfish

jfish
16th February, 2011, 03:44 PM
I will be updating the script over the next few days.. I am going to get the script integrated into the Pli Jade 3 menu so can be called from box directly (as at the moment I run it via Telnet)

may decide to host file on my webserver - so people who are using it can connect and download the boquets. May need to add some checking to ensure web server it available before performing the update.

jfish
20th February, 2011, 07:35 PM
another update

The script now check to make sure the server is online before performing the update.

I tried to integrate the script into Open PLI image menu, but it was hanging so need to do some debug to find out

also the script now connects to my server - therefore if you try it out yourself, it will connect to my server and download the channel list.

At the moment only executed via Telnet which is not ideal.

if anyone knows how to integrate the script into the Menu then I would like to know. As PPanel is giving me problems.

topman96
22nd February, 2011, 10:22 AM
i am a bit new to this will this work on a dreambox800hd clone with black hole and enigma2 installed
thanks

jfish
22nd February, 2011, 11:58 AM
i am a bit new to this will this work on a dreambox800hd clone with black hole and enigma2 installed
thanks

not as yet, as the this one only works for Enigma 1 images

just need to modify some bits to make it compatible with enigma 2

rossi2000
22nd February, 2011, 10:54 PM
hi mate

nice work!

is it possible to hide the output onscreen from the channeload function so it just displays the echos?

jfish
22nd February, 2011, 11:07 PM
hi mate

nice work!

is it possible to hide the output onscreen from the channeload function so it just displays the echos?

yes can be done by redirecting output to /dev/NULL - see attached .

rossi2000
22nd February, 2011, 11:15 PM
could u give an example please?

ive just edited the script for E2 and doing some testing right now, its all good , id just like to keep the echos onscreen

jfish
22nd February, 2011, 11:20 PM
could u give an example please?

ive just edited the script for E2 and doing some testing right now, its all good , id just like to keep the echos onscreen

example of what would you like ????

the eschos are still present, now when the tar file is unzipped/untarred - instead of getting the list of all files, nothing is displayed, as stdout is sent to NULL device.

rossi2000
22nd February, 2011, 11:31 PM
ahh i see > /dev/null thanks

rossi2000
26th February, 2011, 12:12 AM
jfish
i'm having a slight issue with the checkhost function, all ive done is replaced your url with my url but i dont think its checking properly, the script will carry on even if my hosting is down

jfish
28th February, 2011, 10:24 AM
jfish
i'm having a slight issue with the checkhost function, all ive done is replaced your url with my url but i dont think its checking properly, the script will carry on even if my hosting is down

take this line out

rm /tmp/check.txt

then check the file /tmp/check.txt and see what is written to this file

bacha52
28th February, 2011, 08:35 PM
hi good evning all membres i am newbi and i nead help for to work my dm500s sat a frend gift me and also he now nothing about this

jfish
28th February, 2011, 09:48 PM
hi good evning all membres i am newbi and i nead help for to work my dm500s sat a frend gift me and also he now nothing about this

please start a new thread regarding your issue

jfish
2nd March, 2011, 02:56 PM
the next update will detect which DM version you are running (Enigma 1 or Enigma 2) and then download the correct files. Therefore a single script for any of the dreambox's

also noticed some files are left on the box once the script finishes, and these will be removed

may also include the picons update as part of the script.

Still looking for feedback from people who have used the script.

rossi2000
4th March, 2011, 12:08 AM
yo jfish

Connecting to xx.xx.xx.xx (xx.xx.xx.xx:80)
wget: can't open 'index.html': File exists

this is whats in the check.txt

jfish
4th March, 2011, 01:01 AM
yo jfish

Connecting to xx.xx.xx.xx (xx.xx.xx.xx:80)
wget: can't open 'index.html': File exists

this is whats in the check.txt

can you modify the checkhost function and use this code


for i in $svr;
do
if [ $i = "Unable" ]
then
dead=1
elif [ $i = "can't" ]
then
dead=1
else
dummyval=999
fi


let me know the outcome

jfish
4th March, 2011, 11:40 PM
latest script

what new

- checks type of dreambox and downloads the correct file (enigma1 or enigma2)
- log written to text file now /var/etc/refresh.txt
- additional check done on host to confirm if online
- variable used to make it easier to modify parameters

ensure you have the 2 bouquet files on your host website

e1.bq.tar.gz for Enigma 1 images
e2.bq.tar.gz for Enigma 2 images

change the line url="kryten.dyndns.info" to reflect your own host to download the file from

rossi2000
4th March, 2011, 11:50 PM
can you modify the checkhost function and use this code




let me know the outcome

yo mate

with that code replaced, it doenst update at all, even if server is online, it just goes straight to error connecting to server

jfish
5th March, 2011, 12:17 AM
yo mate

with that code replaced, it doenst update at all, even if server is online, it just goes straight to error connecting to server

using the new code in the script, and my webserver down

I get this


Starting Updating the Channel List
Detecting Dreambox Type
DM500
Enigma 1
Please Waiting..Connecting to Server
Connecting to kryten.dyndns.info[213.107.133.168]:80
Error Connecting to Server

with webserver up I get this


Starting Updating the Channel List
Detecting Dreambox Type
DM500
Enigma 1
Please Waiting..Connecting to Server
Connecting to kryten.dyndns.info[213.107.133.168]:80
Connected to Server
Connecting to kryten.dyndns.info[213.107.133.168]:80
remotever.txt 100% |*****************************| 2 00:00 ETA
No Update Of Channel Needed

With ver.txt file missing from DM


Starting Updating the Channel List
Detecting Dreambox Type
DM500
Enigma 1
Please Waiting..Connecting to Server
Connecting to kryten.dyndns.info[213.107.133.168]:80
Connected to Server
Version File Missing - Reloading Channel List
Downloading Latest Channel List For Sky Digital UK
Connecting to kryten.dyndns.info[213.107.133.168]:80
e1.bq.tar.gz 100% |*****************************| 43698 00:00 ETA
Completed Downloading Latest Channel List
Extracting Latest Channel List Enigma 1
Copying Latest Channel List Enigma 1
Completed Latest Channel List Enigma 1
Connecting to kryten.dyndns.info[213.107.133.168]:80
remotever.txt 100% |*****************************| 2 00:00 ETA
Please Wait...Refreshing Channel List
+ok+okChannel List Refreshed

with new version of bouquets


Starting Updating the Channel List
Detecting Dreambox Type
DM500
Enigma 1
Please Waiting..Connecting to Server
Connecting to kryten.dyndns.info[213.107.133.168]:80
Connected to Server
Connecting to kryten.dyndns.info[213.107.133.168]:80
remotever.txt 100% |*****************************| 2 00:00 ETA
New Version of Channel List Found..Updating
Downloading Latest Channel List For Sky Digital UK
Connecting to kryten.dyndns.info[213.107.133.168]:80
e1.bq.tar.gz 100% |*****************************| 43698 00:00 ETA
Completed Downloading Latest Channel List
Extracting Latest Channel List Enigma 1
Copying Latest Channel List Enigma 1
Completed Latest Channel List Enigma 1
Please Wait...Refreshing Channel List
+ok+okChannel List Refreshed
Process Complete

jfish
5th March, 2011, 12:21 AM
if you have just downloaded the file I posted a few minustes ago, dont use this.. found a bug inside it and may cause some weird out of disk space error (not even sure why it happened) use this attached on

rossi2000
5th March, 2011, 12:25 AM
ah no probs i'll have a look some moire

on the new script, there are no commands to reload enigma2 bouquet + lamedb, they are needed and as follows:-

wget -qO - http://127.0.0.1/web/servicelistreload?mode=1 <-- lamedb

wget -qO - http://127.0.0.1/web/servicelistreload?mode=2 (http://127.0.0.1/web/servicelistreload?mode=2)<--- bouquets

for the tar.gz creation

i usually have my bouquets in enigma2 folder then i tar the folder up into enigma2.tar.gz
what is the correct way to make a tar for your script? i know they are to be named e2.bq.tar.gz etc but what about inside the tar

jfish
5th March, 2011, 12:30 AM
ah no probs i'll have a look some moire

on the new script, there are no commands to reload enigma2 bouquet + lamedb, they are needed and as follows:-

wget -qO - http://127.0.0.1/web/servicelistreload?mode=1 <-- lamedb

wget -qO - http://127.0.0.1/web/servicelistreload?mode=2 (http://127.0.0.1/web/servicelistreload?mode=2)<--- bouquets

for the tar.gz creation

i usually have my bouquets in enigma2 folder then i tar the folder up into enigma2.tar.gz
what is the correct way to make a tar for your script? i know they are to be named e2.bq.tar.gz etc but what about inside the tar



thanks will add the bit to reload on enigma 2 box (I dont have a DM800 to test on - unless someone can donate me one)

I use IZArc to create the file, noticed using 7Zip the tar.gz file wasnt recognised by the DM500.

rossi2000
5th March, 2011, 12:33 AM
i can test its np :) heh

i know about creating tars what i meant was
inside the tar.gz do you just have bouquet files or a folder named bq and the files inside that? know what i mean?

jfish
5th March, 2011, 12:36 AM
another update

this includes function to reload engima 2 bouquets

jfish
5th March, 2011, 12:38 AM
i can test its np :) heh

i know about creating tars what i meant was
inside the tar.gz do you just have bouquet files or a folder named bq and the files inside that? know what i mean?

no I dont retain the folder structure, the files are in a flat format - the script just moves the correct files to the correct location

I may look into having file structure within the tar.gz file and then moving the files/folders in one go - therefore not messing with moving individual files and probably make the code more efficient.

rossi2000
5th March, 2011, 12:48 AM
ah cool thx

also the e2 reload commands dont need the root:dreambox in there its just 127.0.0.1 :)

satsalot
5th August, 2011, 05:51 PM
@ Jfish

U r a legend mate! I have been trying to setup a script like this to use in CSP for a good 12 months.

Thankyou for your efforts

Cheers

:party : Satsalot :wink:

SGTFlipFlop
25th August, 2011, 10:46 PM
Finally got round to doing this and I'm lost.

On a DM500 where does the file go? & where do you look to enable the update?

Same questions as above but for a DM800

Please help a script noob out :)

RuberDuck
25th August, 2011, 10:50 PM
Finally got round to doing this and I'm lost.

On a DM500 where does the file go? & where do you look to enable the update?

Same questions as above but for a DM800

Please help a script noob out :)

the best two people i can think for you to have a word with would be rossi2000 of DBUK or DIGIDUDE of the DW forum.

or even give b16mcc a shout on DBUK.

satsmo
25th August, 2011, 10:52 PM
There are plenty of peeps here that write those specific scripts.

SGTFlipFlop
25th August, 2011, 10:52 PM
I'm running rossi's script at the moment, But I like the idea of a checking script to see what is the latest bouquets

jfish
26th August, 2011, 04:20 PM
Finally got round to doing this and I'm lost.

On a DM500 where does the file go? & where do you look to enable the update?

Same questions as above but for a DM800

Please help a script noob out :)

if you mean where does the script go, you can place it anywhere on the dm .. I normally have it in /var/scripts on a dm500 and etc/scripts on a dm800

to run the update, you can do it via a cronjob and run the script once a day or if you know how, incorporate it in an image.

lfc84
24th September, 2011, 02:09 PM
tar.gz file downloaded to dreambox but it remains at 0kb.


problem now fixed....see below

lfc84
25th September, 2011, 02:50 PM
Reboot of everything.....

.....Now works !!!!

Jo-Jo
25th September, 2011, 11:51 PM
surly you could just host the a file in the addons section under settings there are sky uk settings available to download on there but they are from 2010 i think

wmccull
26th September, 2011, 08:04 PM
So the script is 100% working , but may require a reboot for settings to take place ?

Jo-Jo
27th September, 2011, 03:49 AM
can anyone recommend a file host or a free webspace i can store my tar.gz i have tried many but box reboots and does not upload any channel list

Jo-Jo
27th September, 2011, 05:57 AM
hi guys i have been working all night to try get this working with the plugin script not the auto check one.

i have bought webspace and a domain name and i can successfullt download the tar.gz file through my browser to my computer etc but when i edit the web address to the script it does not load any channels can someone please tell me what the tar.gz file has to be name or even post a working channel bouquet list so i can upload it to my server and test if its my bouquet list at fault or not

any help will be much appreciated thankyou

PLEASE IGNORE ABOVE POST I DOWNLOADED FRESH SCRIPTS AND TRIED AGAIN AND ALL IS WELL

wmccull
27th September, 2011, 06:40 AM
Have you had a look at free webs ? They offer a 100mb bandwidth on web accounts per month .
O e of the options is to make it dk specificthen you wouldn't go over the bw limit

wmccull
27th September, 2011, 06:44 AM
Jo-jo pm me the details and I can have a look

Jo-Jo
27th September, 2011, 06:50 AM
i have it all working now thanks its pretty quick too am gonna have a crack at the auto check script later on now :)

Jo-Jo
27th September, 2011, 07:26 AM
works well on my dm500-s but not on my dm7020 it does not load any bouquets at all and if i already have some it delete them all :(

Jo-Jo
27th September, 2011, 01:55 PM
well i did have it working flawlessly went to bed for couple of hours tried again and its not installing the channel list again for some strange reason

arghhhh

it basicly now just deletes all settings rather than installing new settings

here is what i have done

have channel list bouquets (sgt flip flop)
rename the folder the files are in to enigma1
rar this folder up
convert with IZArc to .tar.gz
upload the .tar.gz to my web server

to test the fille is downloadable i type the webaddress into my browser and the file downloads perfectly

edit the Enigma1_Bouquet_Update_userscript.sh with my web address pointing to the .tar.gz file
upload both the sh and cfg file to var/tuxcom/plugins
chmod the sh file to 755
reboot box
when box returns
press yellow
select enigma1 bouquet update
i get executing blah blah
then another screen that says
exec+

box then reboots and return with any other settings i did have gone

this is exactly the same way i had it all working this morning and it worked great but now its now working for some strange reason

any help much appreciated

thanks in advance


i have also tried the auto check script and with a channel list installed through db edit after the time limit of 1 minute the script runs and deletes the channel list like it did do manually through plugins :(

i can not think what is wrong

SGTFlipFlop
27th September, 2011, 02:08 PM
Try these, I found hassle with a few rarring programs and the one I use works fine.

Jo-Jo
27th September, 2011, 02:13 PM
cheers will ftp them to the server now and try again

Jo-Jo
27th September, 2011, 02:16 PM
still the same with your tar.gz files mate
here is a copy of the log

+ BG=http://mywebsiteaddresshere/enigma1.tar.gz
+ cd /tmp/
+ wget
BusyBox v1.01 (2007.12.17-17:14+0000) multi-call binary
Usage: wget [-c|--continue] [-q|--quiet] [-O|--output-document file]
[--header 'header: value'] [-Y|--proxy on/off] [-P DIR] url
+ chmod 755 /tmp/enigma1.tar.gz
chmod: /tmp/enigma1.tar.gz: No such file or directory
+ tar -xzvf enigma1.tar.gz
tar: enigma1.tar.gz: No such file or directory
+ cd /tmp/enigma1
cd: 15: can't cd to /tmp/enigma1
+ rm -rf /var/etc/satellites.xml
+ mv /tmp/enigma1/satellites.xml /var/etc/
mv: unable to rename `/tmp/enigma1/satellites.xml': No such file or directory
+ cd /var/tuxbox/config/enigma/
+ rm -rf userbouquet.d79aa.tv
+ rm -rf userbouquet.db084.radio
+ rm -rf userbouquets.file.epl userbouquets.radio.epl userbouquets.tv.epl
+ rm -rf bouquets
+ rm -rf services
+ rm -rf services.locked
+ mv /tmp/enigma1/* /var/tuxbox/config/enigma/
mv: unable to rename `/tmp/enigma1/*': No such file or directory
+ rm -rf /tmp/enigma1
+ rm -rf /tmp/enigma1.tar.gz
+ reboot

SGTFlipFlop
27th September, 2011, 02:18 PM
This may stupid a stupid question, But have you editted the script file with your website address

as the log says :- + BG=http://mywebsiteaddresshere/enigma1.tar.gz

Not sure if you done that just to post on the forum

Jo-Jo
27th September, 2011, 02:20 PM
This may stupid a stupid question, But have you editted the script file with your website address

as the log says :- + BG=http://mywebsiteaddresshere/enigma1.tar.gz

Not sure if you done that just to post on the forum


yes i just edited my webaddress out so no one has access it lol i put the text there to show this is where i put my web address

Jo-Jo
27th September, 2011, 02:33 PM
i more thing when i downoad the file through a browser from my server it says downloading enigma1.tar.tar now i never noticed this before but it this normal ?
the file is deffo called enigma1.tar.gz tho

SGTFlipFlop
27th September, 2011, 02:36 PM
Just tested it on my DM500 and it worked no problems at all,

Got 1 error about cannot find directory so inside the var directory created a folder called script, tried it again and worked fine.

Jo-Jo
27th September, 2011, 02:42 PM
i have just trien the manual plugin way again and its downloaded the channel list fine this time jesus this is mind boggling lol good fun tho

going to try the auto script again

which script are yu using and is alls you have to edit the url ?

SGTFlipFlop
27th September, 2011, 02:44 PM
I'm using a manual one by rossi posted earlier in this thread, Yellow button and choose

Jo-Jo
27th September, 2011, 02:47 PM
ahh i have that working ok again now but the auto script is just deleting all settings rather than renewing them

SGTFlipFlop
27th September, 2011, 02:50 PM
Post the auto update script here or in PM to me and ill have a look

Jo-Jo
27th September, 2011, 03:49 PM
#!/bin/sh
# script to download latest channels lists
# Tested on Enigma 1 PLi Jade 3 images (DM500S)
# Jfish 1 Feb 2011
# change log
# v1 - initial release
# v1.1 - remove of reboot at the end of script - no need for it now
# v1.2 - check for version update and only update if new version exists
# v1.3 - added functions for copy routine - code easier to read and structured far better
# v1.4 - check to see if local version exist, if not get channels list down and copy version file over
# v1.5 - check to see if server is online before updating channel list
# v1.6 - redirect output to NULL (disable screen output)
# v1.7 - detect DM version and then perform necessary download for Enigma1 or Enigma2 image
# v1.8 - Log of process written to /var/etc/refresh.txt - can be useful in debugging process
# v1.9 - delete temp files created in /tmp folder
dead=0
dummyval=1
box="UNDEFINED"
etype=0
ebq=""
url="http://*********.co.uk/enigma1.tar.gz"
date=`date -R`
checkhost() {
echo "Please Waiting..Connecting to Server"
wget http://$url 2> /tmp/check.txt
svr=`cat /tmp/check.txt`
for i in $svr;
do
if [ $i = "Unable" ]
then
dead=1
elif [ $i = "can't" ]
then
dead=1
else
dummyval=999
fi
done
rm -rf /var/bin/index.html
}
getfiles () {
echo "Downloading Latest Channel List For Sky Digital UK"
cd /tmp
mkdir bq
cd bq
wget "http://$url/$ebq"
echo "$date Successfully downloaded $ebq" >> /var/etc/refresh.txt
echo "Completed Downloading Latest Channel List"
}
loade1 () {
echo "$date Downloaded $ebq File From Host $url" >> /var/etc/refresh.txt
chmod 755 /tmp/bq/$ebq
echo "Extracting Latest Channel List Enigma 1"
tar -xzvf $ebq > /dev/null
echo "Copying Latest Channel List Enigma 1"
rm -rf /var/etc/satellites.xml
mv /tmp/bq/satellites.xml /var/etc/
cd /var/tuxbox/config/enigma/
rm -rf *.tv
rm -rf *.epl
rm -rf *.radio
rm -rf *bak
rm -rf bouquets
rm -rf services
rm -rf services.locked
mv /tmp/bq/* /var/tuxbox/config/enigma/
rm -rf /tmp/bq
rm -rf /var/tuxbox/config/enigma/$ebq
echo "Completed Latest Channel List Enigma 1"
}
loade2 () {
echo "$date Downloaded $ebq File From Host $url" >> /var/etc/refresh.txt
chmod 755 /tmp/bq/$ebq
echo "Extracting Latest Channel List Enigma 2"
tar -xzvf $ebq > /dev/null
echo "Copying Latest Channel List Enigma 2"
rm -rf /var/etc/satellites.xml
mv /tmp/bq/satellites.xml /etc/tuxbox/
cd /etc/enigma2
rm -rf *.tv
rm -rf *.radio
rm -rf blacklist
rm -rf lamedb
mv /tmp/bq/* /etc/enigma2
rm -rf /tmp/bq
rm -rf /etc/enigma2/$ebq
echo "Completed Latest Channel List Enigma 2"
}
reload () {
echo "Please Wait...Refreshing Channel List"
wget -qO - http://root:dreambox@127.0.0.1/cgi-bin/reloadSettings
wget -qO - http://root:dreambox@127.0.0.1/cgi-bin/reloadUserBouquets
echo "Channel List Refreshed"
echo "Process Complete"
echo "$date Process Complete" >> /var/etc/refresh.txt
rm -rf /tmp/remotever.txt
rm -rf /tmp/check.txt
}
getverfile () {
cd /tmp
wget "http://$url/remotever.txt"
chmod 666 /tmp/remotever.txt
}
detectbox () {
echo "Detecting Dreambox Type"
if grep -qs DM500 /proc/bus/dreambox ; then
box=DM500
etype=1
elif grep -qs DM7020 /proc/bus/dreambox ; then
box=DM7020
etype=1
elif grep -qs DM600PVR /proc/bus/dreambox ; then
box=DM600PVR
etype=1
elif grep -qs DM500PLUS /proc/bus/dreambox ; then
box=DM500plus
etype=1
elif grep -qs 'dm8000' /proc/stb/info/model ; then
box=DM8000HD
etype=2
elif grep -qs 'dm800' /proc/stb/info/model ; then
box=DM800HD
etype=2
else
box=UNDEFINED
etype=0
fi
echo $box
echo "$date $box and Enigma $etype Detected" >> /var/etc/refresh.txt
if [ $etype -eq 1 ]; then
ebq="e1.bq.tar.gz"
elif [ $etype -eq 2 ]; then
ebq="e2.bq.tar.gz"
elif [ $etype -eq 0 ]; then
echo "Box Not Identified"
echo "** ERROR Unable to Identify Dreambox Version ***" >> /var/etc/refresh.txt
echo "$date Process Complete" >> /var/etc/refresh.txt
exit
fi
}
detectdm () {
echo "Detecting Dreambox Type"
if [ -f "/proc/bus/dreambox" ]; then
echo "Enigma 1 Image Found"
box=`cat /proc/bus/dreambox | grep -i ^type`
etype=1
ebq="e1.bq.tar.gz"
elif [ -f "/proc/stb/info/model" ]; then
echo "Enigma 2 Image Found"
box=`cat /proc/stb/info/model | grep -i ^type`
etype=2
ebq="e2.bq.tar.gz"
else
echo "This is not a Dreambox"
exit
fi
}
echo "Starting Updating the Channel List"
echo "$date Starting Update" >> /var/etc/refresh.txt
detectbox
checkhost
if [ $dead = 0 ]
then
echo "Connected to Server"
echo "$date Successfully Connected to $url" >> /var/etc/refresh.txt
if [ ! -f "/var/etc/ver.txt" ]; then
echo "Version File Missing - Reloading Channel List"
getfiles
if [ $etype -eq 1 ]; then
loade1
elif [ $etype -eq 2 ]; then
loade2
fi
getverfile
mv /tmp/remotever.txt /var/etc/ver.txt
chmod 666 /var/etc/ver.txt
rm /tmp/check.txt
echo "$date Version File Missing" >> /var/etc/refresh.txt
reload
exit;
fi
getverfile
localv=`cat /var/etc/ver.txt`
remotev=`cat /tmp/remotever.txt`
if [ $remotev -gt $localv ]; then
echo "New Version of Channel List Found..Updating"
getfiles
if [ $etype -eq 1 ]; then
loade1
elif [ $etype -eq 2 ]; then
loade2
fi
rm -rf /var/etc/ver.txt
mv /tmp/remotever.txt /var/etc/ver.txt
chmod 666 /var/etc/ver.txt
echo "$date New Version Found" >> /var/etc/refresh.txt
reload
else
echo "No Update Of Channel Needed"
echo "$date No Refresh Required" >> /var/etc/refresh.txt
echo "$date Process Complete" >> /var/etc/refresh.txt
rm -rf /tmp/remotever.txt
rm -rf /tmp/check.txt
exit;
fi
else
rm -rf /tmp/remotever.txt
rm -rf /tmp/check.txt
echo "Error Connecting to Server"
echo "$date *** Error Connecting To Server $url ***" >> /var/etc/refresh.txt
echo "$date Process Complete" >> /var/etc/refresh.txt
fi

apecol
7th January, 2012, 02:05 PM
I can use this script to distribute the list of dm500 and dm800? as I do, I have nowhere to stay

apecol
9th January, 2012, 01:03 PM
the script is running well.
a suggestion for version 2.1 update to check the script itself if it occurred on the server update download and play it in the plugins folder.
refresh.txt start from 0 after hitting a file size.

congratulations

gill154
9th January, 2012, 06:25 PM
thanks to all for great work
is it possible if it load auto on start up intead of pressing yellow button
thanks in advance

box2box999
8th February, 2012, 05:24 PM
Hi, and great work guys.

I'm having a few problems getting it going on my box though, using the most recent channelrefresh.rar script which was uploaded.
Is there a newer version of the script available?

I'm on a DM500, and can get the script to execute via the plugin menu, but it just deletes all my bouquets and reboots and I can't figure out what has gone wrong.

Here is the contents of the log (refresh.txt)


Fri, 10 Feb 2012 21:45:25 +0000 Starting Update
Fri, 10 Feb 2012 21:45:25 +0000 DM500 and Enigma 1 Detected
Fri, 10 Feb 2012 21:45:25 +0000 Successfully Connected to http://dl.dropbox.com/u/***removed_by_me***/enigma1.tar.gz
Fri, 10 Feb 2012 21:45:25 +0000 Successfully downloaded e1.bq.tar.gz
Fri, 10 Feb 2012 21:45:25 +0000 Downloaded e1.bq.tar.gz File From Host http://dl.dropbox.com/u/***removed_by_me***/enigma1.tar.gz
Fri, 10 Feb 2012 21:45:25 +0000 New Version Found
Fri, 10 Feb 2012 21:45:25 +0000 Process Complete

box2box999
10th February, 2012, 11:26 PM
I have now fixed this - I did not have the bouquet files in a folder called enigma1 within the tar.gz

Great Plugin - Thanks everyone

2tone
22nd February, 2012, 09:01 PM
Would this work on a tm 500 or is part of the file sysytem different

hatchet
22nd March, 2012, 12:05 AM
How would i change the script to upload cable bouquets and not sat ones?

Ta.

ziggycat
25th March, 2012, 03:13 PM
Was going to code something like this myself, so thanks to jfish and everyone else who worked on this.

Have this running nicely, using a AWS EC2 instance to host the bouquet files. DM500s runing PLI image, setup to use the yellow button to execute the script (and cron to run every 30 days).


How would i change the script to upload cable bouquets and not sat ones?

Ta.

modify the script to copy the bouquet files to ==> /var/tuxbox/config/enigma/cable/

hatchet
29th March, 2012, 10:47 PM
As soon as i edit the file with the link to the url ( which is correct ) the script doesn't execute...

How is that?

SGTFlipFlop
29th March, 2012, 11:49 PM
As soon as i edit the file with the link to the url ( which is correct ) the script doesn't execute...

How is that?

Have you chmod the file after you editted it?

forbezy2010
30th March, 2012, 07:37 PM
hey peeps n scripters
can some one please rite a script for
me for me dm500c (cable box)
ive tried to edit the ones been posted
but im lost lol
please

Forbezy

hatchet
1st April, 2012, 08:57 PM
Have you chmod the file after you editted it?

Yes mate, ive even tried changing it to the link you sent me via PM and it refuses to execute

Any ideas?

ziggycat
2nd April, 2012, 02:52 PM
Yes mate, ive even tried changing it to the link you sent me via PM and it refuses to execute

Any ideas?

here's a cut down version of the script, give it a try.


#!/bin/sh
# script to download latest channels lists
# Jfish 1 Feb 2011

pass="dreambox" # <== change this to your dreambox password (default is 'dreambox')
ebq="e1.tar.gz" # <== your (compressed) bouquet list
url="blah.blah.net" # <== your server

checkhost () {
test=`ping -c 1 $url`
[ "$?" -eq 0 ] || exit 1
}

download () {
mkdir /tmp/bq
cd /tmp/bq
wget "http://$url/$ebq"
}

extract () {
chmod 755 /tmp/bq/$ebq
tar -xzvf $ebq > /dev/null
rm -rf /var/etc/satellites.xml
mv /tmp/bq/satellites.xml /var/etc/
cd /var/tuxbox/config/enigma/cable
rm -rf *.tv
rm -rf *.epl
rm -rf *.radio
rm -rf *bak
rm -rf bouquets
rm -rf services
rm -rf services.locked
mv /tmp/bq/* /var/tuxbox/config/enigma/cable/
rm -rf /tmp/bq
}

reload () {
wget -qO - http://root:"$pass"@127.0.0.1/cgi-bin/reloadSettings
wget -qO - http://root:"$pass"@127.0.0.1/cgi-bin/reloadUserBouquets
}

checkhost # can we successfully ping our server ?
download # download our compressed bouquet
extract # copy bouquet files
reload # reload bouquet files

pk24
15th April, 2012, 11:43 AM
this looks great , but where do you get the url to grab the files , I usually use sgtflipflops bouquets grabbed from here but not sure what url to put in to the script to auto update ... can anyone help


thanks in advance

del_piero_3
18th April, 2012, 06:59 PM
another update

this includes function to reload engima 2 bouquets

The script wont run the moment I change the URL, done CHMOD 755 on file. If I leave the URL as it is (kryten.dyndns.info), it will execute fine. My URL via web browser works fine.....am just lost....



Execution Progress:

/bin/sh: usr/script/channelrefresh.sh: not found
Execution finshed!!

a8ree
21st April, 2012, 11:14 PM
Has anyone managed to update this script to download SgtFlipFlops latest Multi sat each time?

jfish
23rd April, 2012, 12:36 PM
The script wont run the moment I change the URL, done CHMOD 755 on file. If I leave the URL as it is (kryten.dyndns.info), it will execute fine. My URL via web browser works fine.....am just lost....



Execution Progress:

/bin/sh: usr/script/channelrefresh.sh: not found
Execution finshed!!


I am suprised it even connects to that hostname, as its been down for a while now and since I re did my servers at home and due to other stuff never had time to update script again

thospot
25th April, 2012, 08:06 PM
hi lads first thanks for the script it works ok with my technomate 500 but the script wont work with my dreambox 500s ,i have pli jads3 image on my dreambox. any ideas what i might be doing wrong .

Jo-Jo
2nd August, 2012, 03:25 AM
i have had a script work now for a while using yellow button and executing the script to download a channel list hosted on private web space although just wondering if the script can be executed every reboot of the box ?

this is the script i use


#!/bin/sh
set -x
exec > /var/script/Enigma1_Bouquet_Update.log 2>&1
#DESCRIPTION=Downloads, Installs & Reloads the latest Enigma1 Bouquets.

#Change the URL to point to your Bouquet zip file
BQ="http://privatewebspace.tar.gz"

cd /tmp/

wget $BQ
chmod 755 /tmp/enigma1.tar.gz
tar -xzvf enigma1.tar.gz

cd /tmp/enigma1
rm -rf /var/etc/satellites.xml
mv /tmp/enigma1/satellites.xml /var/etc/

cd /var/tuxbox/config/enigma/
rm -rf *.tv
rm -rf *.radio
rm -rf *.epl
rm -rf bouquets
rm -rf services
rm -rf services.locked

mv /tmp/enigma1/* /var/tuxbox/config/enigma/

rm -rf /tmp/enigma1
rm -rf /tmp/enigma1.tar.gz

#wget -q http://root:dreambox@127.0.0.1/cgi-bin/reloadUserBouquets
reboot

and also have a config file


name=Enigma1 Bouquet Update
desc=
depend=
type=3
needfb=0
needrc=0
needlcd=0

ASTROBOX
1st September, 2012, 02:53 PM
hey peeps n scripters
can some one please rite a script for
me for me dm500c (cable box)
ive tried to edit the ones been posted
but im lost lol
please

Forbezy
Bro check this link
http://www.digital-kaos.co.uk/forums/f34/sgsh-e1-online-bouquet-plugin-289925/

u need to edit the below in .sh script for it to work for cable box, I'm using 500C for SG use
rm -rf /var/etc/cables.xml
mv /tmp/enigma1/cables.xml/var/etc/
cd /var/tuxbox/config/enigma/cable/
mv /tmp/enigma1/* /var/tuxbox/config/enigma/cable/

Hope this can help u

peds1988
9th September, 2012, 03:32 AM
hi guys,

I keep getting an error when I run the script, it keeps saying tar: invalid number ' 10141 ' ?

can anyone shed any light on this?

sully085
7th August, 2014, 08:43 PM
hi lads I know this is an old tread but I always had my e1 bouguets downloading from dropbox but think its an error fro http to https has anyone got this from dropbox wget: not an http or ftp url: https://dl.dropboxusercontent.com/u/xxxxxxxx/file.tar.gz
and if so do anyone know good http server that host .tar.gz files .cheers

PierreTheron
21st April, 2021, 08:10 PM
script i cannot do m8 but surving is my fiirst degree

SGTFlipFlop
22nd April, 2021, 08:44 PM
Cheers, Glad you survived buddy