Jump to content


Photo

Autoexecute script at startup


  • Please log in to reply
20 replies to this topic

#1 Giangy896

  • Member
  • 1 posts

0
Neutral

Posted 26 February 2016 - 11:08

Hi. I'm a bit new to this think. I read a lot but i couldn't understand how to create a script that will execute only once when the sat in turning on.

The decoder can't get the time because I don't have linked the sat, so i run via telnet

ntpd -q -p pool.ntp.org

But when it lose power i have to do that againt.

Is it possible to save that somewere so when it turns on it executes automatically?

 

Thank you.



Re: Autoexecute script at startup #2 littlesat

  • PLi® Core member
  • 56,612 posts

+694
Excellent

Posted 26 February 2016 - 11:37

You need arrange it such a way that the time is always known before enigma2 starts... And it should only be executed when the box can reach the WWW....

 

ntpd -qn -p pool.ntp.org

Edited by littlesat, 26 February 2016 - 11:44.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Autoexecute script at startup #3 Robinson

  • Senior Member
  • 2,616 posts

+30
Good

Posted 26 February 2016 - 11:43

Why don't you check this: http://forums.openpl...g-time-via-ntp/


ET9000, OpenPLi 4.0, 13E, 19E

HD51, OpenPLi 6.2, 75E - 30W


Re: Autoexecute script at startup #4 littlesat

  • PLi® Core member
  • 56,612 posts

+694
Excellent

Posted 26 February 2016 - 11:54

See post 10 in this tread..

 

So before you run enigma2 the time should be "catched".... E.g. something in E2 with the configs should arrange it...

 

But please note it does prolong the boot time for a few seconds.

 


Note however that e2 doesn't like it very much, if it gets an external systemtime.
Some things (timers, epg) might still think they are running on transpondertime. 

Edited by littlesat, 26 February 2016 - 11:56.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Autoexecute script at startup #5 WanWizard

  • PLi® Core member
  • 69,112 posts

+1,763
Excellent

Posted 26 February 2016 - 12:50

Or install the systemtime plugin and let that handle everything for you, instead of trying to do stuff manually...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Autoexecute script at startup #6 littlesat

  • PLi® Core member
  • 56,612 posts

+694
Excellent

Posted 26 February 2016 - 14:23

I was not aware we had that (already) in our feeds....

I think we could consider to put this dedicated in our images... ;)


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Autoexecute script at startup #7 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 26 February 2016 - 15:34

No, because it's a workaround.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Autoexecute script at startup #8 littlesat

  • PLi® Core member
  • 56,612 posts

+694
Excellent

Posted 26 February 2016 - 15:52

I'm just considering to change it to get the time from the ntp instead of the transponder... e.g. when you 'hit' a transponder with incorrect time you still can get wierd things (missed recordings etc...) of even when the transponder is somehow "out of use"... When connected to the internet the ntp is more trustfull...


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Autoexecute script at startup #9 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 26 February 2016 - 17:14

The system doesn't suddenly change when you come around an invalid transponder. The time is only taken from the startup transponder.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Autoexecute script at startup #10 littlesat

  • PLi® Core member
  • 56,612 posts

+694
Excellent

Posted 26 February 2016 - 19:47

That is right... but when you boot the box on an incorrect transponder or nothing to receive condition or stream or so it will never get a time...


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Autoexecute script at startup #11 Robinson

  • Senior Member
  • 2,616 posts

+30
Good

Posted 26 February 2016 - 20:25

That is right... but when you boot the box on an incorrect transponder or nothing to receive condition or stream or so it will never get a time...

Which is often the case when you often move your dish outside the several most popular satellite positions.


ET9000, OpenPLi 4.0, 13E, 19E

HD51, OpenPLi 6.2, 75E - 30W


Re: Autoexecute script at startup #12 blzr

  • PLi® Core member
  • 2,269 posts

+118
Excellent

Posted 26 February 2016 - 20:52

well, and 'setting as startup service' some reliable channel wouldn't solve this transponder time issue in most cases?

this feature would seem to be made exactly for this...


True sarcasm doesn't need green font...

Re: Autoexecute script at startup #13 Robinson

  • Senior Member
  • 2,616 posts

+30
Good

Posted 26 February 2016 - 20:59

It probably would but if you are at 27.5W or at 52E and your startup service is at 19.2E, it wouldn't be quite fun when you use a rotor.


ET9000, OpenPLi 4.0, 13E, 19E

HD51, OpenPLi 6.2, 75E - 30W


Re: Autoexecute script at startup #14 Pr2

  • PLi® Contributor
  • 6,113 posts

+260
Excellent

Posted 26 February 2016 - 21:46

Hi,

 

This time problem is a recurring question here. I think that OpenPLi should have this option available out-of-the-box in the GUI.

 

What some image builders do, is to propose the option in the menu but install the corresponding .ipk from the feed only when the end-user decide to really use this feature.

NTP is not that big package and it can also be decided to integrate it by default.

 

We also have more and more users that use there STB disconnected from the antenna but use IPTV channels, or purchase a "zap box" (Vu+ Zero) to install in another room where it has no satellite signal, so it gets no time at startup, and use the remote server feature to zap but would like to have the EPG locally with XMLTV-import.

 

So please OpenPLi team consider to have the NTP option by default in your image, this will avoid the recurring questions about time issue.

 

Pr2


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: Autoexecute script at startup #15 WanWizard

  • PLi® Core member
  • 69,112 posts

+1,763
Excellent

Posted 26 February 2016 - 23:23

Again, there is a plugin in the feeds called systemtime, which deals with all of this, and more. How much more complex must it be?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Autoexecute script at startup #16 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 27 February 2016 - 00:10

Again, there is a plugin in the feeds called systemtime, which deals with all of this, and more. How much more complex must it be?


It is not working properly for ARCH <> mipsel (eg arm / mipsel-nf ...), for now ;)
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Autoexecute script at startup #17 Dimmie

  • Senior Member
  • 2,338 posts

+33
Good

Posted 27 February 2016 - 04:07

or just make an enigma2-prestart script for it



Re: Autoexecute script at startup #18 el bandido

  • Senior Member
  • 365 posts

+13
Neutral

Posted 27 February 2016 - 06:27

The plugin System Time is a "must have" plugin for the United States. This plugin has worked great for me, except it takes 15-30 seconds for the time to adjust when the receiver rebooted or when power is removed from the receiver.



Re: Autoexecute script at startup #19 WanWizard

  • PLi® Core member
  • 69,112 posts

+1,763
Excellent

Posted 27 February 2016 - 08:35

You need to tinker with the settings a bit, sometimes the plugin starts before the network is operational.

 

@athoik,

 

Why is that, does it have some binary closed source component? Is it a 3rd-party plugin, I can't find a recipe for it?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Autoexecute script at startup #20 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 27 February 2016 - 08:38

Why is that, does it have some binary closed source component? Is it a 3rd-party plugin, I can't find a recipe for it?


The dvbdate is part from dvb-apps, the ntpdate is not required because ntpd does the same.

See: http://forums.openpl...-11#entry533630
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users