Unit script auto restart CoreElec after starting

Hi, how can i create an auto restart CoreElec script? Thanks for help.
Not reboot, i need restart kodi




You could tell us why do you even need this?
Why is restart needed? If you need to delay it for some reason add sleep command to /storage/.config/autostart.sh file

Sometimes an addon is not started. How do I do with autostart.sh?

First you should try to enable “wait for network” in coreelec settings.

If this still doesn’t help add command to the autostart.sh file.

sleep 5

sleep 5
) &

Is that correct?

No, just sleep 5. Adding ()& puts command in background and it will not do anything in this case.

Can an example be given?


echo “sleep 5” >> /storage/.config/autostart.sh

is not working…

Then try with larger value.

But you should identify the problem first: why addon doesn’t start. Check kodi.log with debug enabled.

Is there any way to wait for the adon to close and then CoreElec to close? Is such a thing possible with shudown.sh?

Proper addons are closed properly.

Seems you don’t want to provide any useful information so I’m out.

Banned addon -> elementum
No support

1 Like

ok, thanks for help