←  [EN] Enduser support

Forums

»

run script on box boot

daveraver's Photo daveraver 24 Feb 2018

hi all, I am trying it by 2 ways:

by enigma2_pre_start.sh or,
running a startup service on /etc/init.d/

and both no working.

Is these ways working on openpli 6.1? Am I doing things wrong?? I put a sleep 80 before running script...

tested on Formuler f1 box.

thanks in advance.
Edited by daveraver, 24 February 2018 - 16:23.
Quote

WanWizard's Photo WanWizard 24 Feb 2018

Did you make the script executable?

Quote

Erik Slagter's Photo Erik Slagter 24 Feb 2018

If you add a service script to /etc/init.d, don't forget to create symbolic links in /etc/rc?.d, otherwise they won't get started.

Quote

Pr2's Photo Pr2 24 Feb 2018

Why create the symlink manually?
Don't users have to use the  update-rc.d  command to create or delete the symlink?
Quote

WanWizard's Photo WanWizard 24 Feb 2018

If the script is created with the proper headers, that works. If not, the user either needs to know the update-rc.d update syntax, or make manual links...

Quote

daveraver's Photo daveraver 24 Feb 2018

yes, it run, manually on box system loaded state, make executable, and run 'update-rc.d instance defaults' but it seems the openpli image was corrupted, i will try with a fresh image install. thanks to all
Edited by daveraver, 24 February 2018 - 19:24.
Quote

Erik Slagter's Photo Erik Slagter 25 Feb 2018

Why create the symlink manually?
Don't users have to use the  update-rc.d  command to create or delete the symlink?

Yes you can use update-rc.d but I think it's more cumbersome than to create a few symlinks yourself.

Quote

daveraver's Photo daveraver 2 Mar 2018

Well, It seems I am not able to run the rclone binary on startup, I've achieve it running a check binary alive script, */1 * * * * , once per minute on cron, it's the only way to run rclone. no init.d script and no enigma2_pre_start script have worked. rclone doesn't run up to the system is completely loaded, or maybe up to network is loaded, as I've could see. I dont know if I am wrong in my apreciations.

 

Thanks, 

Quote

anudanan's Photo anudanan 2 Mar 2018

I use on my uno4kse a shell script

 

/etc/init.d/rcS.local

 

openpli starts that on systemsstart (with /etc/inittab) with a last link S95local in the rcS.d directory

 

You must only create the /etc/inid,d/rcS.local as a script file and set it so executable

 

It works perfectly on my system


Edited by anudanan, 2 March 2018 - 12:56.
Quote