Skip to content

Startup & Shutdown Scripts

project-owner edited this page Mar 9, 2019 · 1 revision

There are two scripts available to provide a custom user-defined logic during player startup and shutdown:

/home/pi/Peppy/scripts/startup.py
/home/pi/Peppy/scripts/shutdown.py

Those scripts are just the templates where users can place their own logic. The scripts will be executed during player startup and shutdown processes respectively. By default the scripts have just the logging implementation. Users can add any logic to those scripts. For example that can be the logic for switching on/off some additional devices, the logic for reading data from sensors, handling the acquired data and so on.

The scripts can work in two modes:

  • Synchronous - in this mode the player will wait until the custom logic finishes the excution
  • Asynchronous - in this mode the player will start the script in a separate thread and it will continue the execution without waiting the script termination.

The startup script can be either synchronous or asynchronous. The shutdown script can be only synchronous to avoid abnormal termination.

<<Previous | Next>>

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