How to autostart kodi and a custom script at boot

Hi, I know this is an old thread, but I am confused as to where to add my own script to run, as well as running Kodi on startup. I can’t see how to run both. If I select the custom script then Kodi won’t boot … etc etc
I tried /etc/rc.local but that does not work anymore …

What is the correct way to do this with the current version?

You can only choose either one of this options in dietpi-autostart, but there are several ways to circumvent this problem.
For example you can leave the autostart option for kodi and modify your crontab to execute your script at boot. For example:

@reboot sleep 30 && sudo /absolute/path/to/your/

Also make sure you use absolute path inside your script file.

Yes I would do it same way as @Jappe proposed. :+1:

Thanks will go the crontab route. Does crontab spawn your script? Or do I have to add an & to it …

By the way, in dietpi-autostart, I briefly changed to the custom script to see the location path, then went back to set Kodi as autostart. When I next ran Kodi I had lost a lot of my customisation settings and had to redo them. That was annoying … That seems to me it should not happen.

Crontab spawns the script in background by default, no need for a &.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.