Skip to content

Add your own startup script (EN)

lackyluuk edited this page Aug 15, 2017 · 3 revisions

Follow these instructions if you want to create your own startup script which is executed automatically during the startup of recalbox.

All startup scripts are located in /etc/init.d. They are processed one after the other. That means the script S31emulationstation will be processed before S99MyScript. According the file names you can determine the execution order.

The start method of a script will be executed at startup and the stop method at shutdown of recalbox.

Steps to create your own startup script:

  • Login with root access on your recalbox.
  • The system is read-only by default. You have to get write access with the following command: mount -o remount rw, /
  • Change the directory to /etc/init.d with the following command: cd /etc/init.d
  • Type ls to see all available scripts in init.d.
  • Create a new script with nano S99MyScript.py (Of course you can use any number, name or script type (.py, .sh, etc.)) and edit it as you need it. For this you can use the following script structure which already contains the start, stop and restart / reload methods.

#!/bin/bash

case "$1" in 
   start)  
         Add your startup code here!
         ;;  
   stop)  
         Add your shutdown code here!
         ;;  
   restart|reload)  
         Add your restart / reload code here!
         ;;  
   *)  
esac  

exit $?  
  • Once your script is ready, save and close it with STRG + X.
  • Make it executable with the command chmod +x S99MyScript.py (Or whatever you called your script).
  • Now you can restart recalbox or start the script on your own with /etc/init.d/S99MyScript start
  • You are ready :)

English

Basic

Advanced


Français

Basique

Avancée


Deutsch

Basic

Fortgeschritten


Español

Basic

Avanzado


Português

Básico

Avançado


Italiano

Di base

Avanzate

Clone this wiki locally
You can’t perform that action at this time.