Hi!
On 8/30/20 6:40 AM, amuza wrote:
Hi,
I'm running LiMe based on OpenWRT v19.07.3
:)
I would like to run some commands permanently.
What do you mean by permanently? is it a program that does not end (like a service or
daemon)?
/etc/lime-assets/node/myscript.sh script with those
commands and gave it
execute permissions.
Then I added the following to /etc/config/lime-node:
config run_asset 'sh'
option asset 'node/myscript.sh'
option when 'ATCONFIG'
Everything works ok, but only if I manually run lime-config. The script
does not work after a reboot. I also tried with option "ATFIRSTBOOT",
but I get the same, it only works if I manually run lime-config.
What am I missing?
run_asset does not support running a script on each boot if that is what you want. We may
add support for that in the future.
I don't know exactly what is the best/recommended way to do it (there are many).
One way to do it is to use /etc/rc.local using 'copy_asset' for example doing:
config copy_asset 'sh'
option asset 'node/myscript.sh'
option dst '/etc/rc.local'
Best!
SAn