Skip to content

Instantly share code, notes, and snippets.

@beancurd1
Created March 8, 2020 03:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save beancurd1/85ef3eba60afdb77cb53dd0b4b324b0a to your computer and use it in GitHub Desktop.
Save beancurd1/85ef3eba60afdb77cb53dd0b4b324b0a to your computer and use it in GitHub Desktop.
CoreELEC or LibreELEC autostart.sh to auto start scripts upon reboot
# this located in /storage/.config/autostart.sh on a CoreELEC box, run chmod +x to make it executable
# use nohup to run the script in the backgroud
# nohup /storage/freemyip/updateDynDNS.sh &
# use this to run once off tasks
(
# pause few seconds to wait for network & time services to start
sleep 5
DT=$(date +"%m-%d-%Y, %r")
echo "Box rebooted on $DT, running tasks in autostart.sh" >> /storage/freemyip/DynDNSUpdate.log
/storage/freemyip/updateDynDNS.sh
) &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment