Is it possible to detect and interrupt linux (Ubuntu 16.04) shutdown signal (e.g. power button clicked or runs out of battery). I have a python application that is always re
Look into this Basically, put a script in /etc/rc0.d/ with the right name and execute a call to you python script.