Run a script automatically during shutdown or reboot? - Raspberry Pi Forums


i'm using raspberry couple pi's stream footage ip security cameras using omxplayer.

in case streams lost, have cron job runs every minute restart stream if it's not running.

unfortunately, open stream prevents rpi rebooting or shutting down, , if kill process, cron fires before can issue reboot/shutdown commands.

so, i'm wondering if there way execute script runs when issue reboot or shutdown commands automatically kill omxplayer.bin process... know use bash aliases, i'm used reboot/shutdown syntax other rpi projects, confusing have remember different command.

thoughts?

what stop cron before shutting down, kill program , halt or reboot:

code: select all

/sbin/service crond stop


raspberrypi



Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support