Skip to content

Instantly share code, notes, and snippets.

@rogeriopradoj
Forked from beancurd1/autostart.sh
Created July 27, 2023 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogeriopradoj/825d39fa80b38ec0ae5268ce2b747216 to your computer and use it in GitHub Desktop.
Save rogeriopradoj/825d39fa80b38ec0ae5268ce2b747216 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