On August 30, 2020 6:59:00 PM GMT-03:00, amuza <amuza(a)riseup.net> wrote:
SAn:
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)?
Nope, sorry, I just meant to survive a reboot.
> /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.
Ok, understood.
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
Alright, thanks. Yes, in the beginning I did it just with rc.local and
everything worked ok, but then I remembered this assets thing and
wanted
to try to do it the LiMe way.
I will try with this mixed solution you suggest.
Thank you very much!
Please report back if it worked or not :)
You are the first user of the copy_asset and run_asset functionality ! :)