[SOLVED] Autostart.sh not working

Hi,
I did a fresh install of newest coreelec (amlogic.arm 9.0.1). If I can remember correctly there was no autostart.sh at beginning, so I created one to get rid of this heartbeat for my Odroid C2.

/storage/.config/autostart.sh created (utf-8 encoded).

#!/bin/sh

(
echo none > /sys/class/leds/blue:heartbeat/trigger
) &

If I execute the echo manually, it works. However, it seems that the autostart.sh is not executed, because the led is still blinking after reboot :wink:

What is the issue? Is there a log to see if something went wrong?

.
.
P.S. systemctl status kodi-autostart.service -l --no-pager

kodi-autostart.service - Kodi user autostart script
Loaded: loaded (/storage/.config/system.d/kodi-autostart.service; disabled; vendor preset: disabled)
Active: active (exited) since Fri 2018-06-22 13:11:51 CEST; 9 months 11 days ago
Main PID: 2614 (code=exited, status=0/SUCCESS)
Memory: 0B
CGroup: /system.slice/kodi-autostart.service

Jun 22 13:11:51 HTPC systemd[1]: Starting Kodi user autostart script…
Jun 22 13:11:51 HTPC systemd[1]: Started Kodi user autostart script.

It needs to be executable:

chmod +x autostart.sh

I had a similar issue where I created the autostart file on a windows system and copied it across. Due to the formatting of the file it would not execute, but looked correct. You might try creating the file from scratch with nano via ssh if you didn’t already, and the chmod suggestion doesn’t work.

1 Like

Yes, you are right.
That is one of the most common problems.

Thanks for the replies!

@relkai
Actually I also thought this way but then I saw that the autostart.sh on my other Odroid C2 (with libreElec) only has 644 permissions.

@wizardknight
Actually² I did this at beginning (added file via nano), like described in https://wiki.libreelec.tv/autostart.sh

Funniest thing is… I did @wizardknight s recommendation again and now, it worked. Strange :slight_smile: Thanks!