shutdownAction. plugin

User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

shutdownAction. plugin

Post by kw123 »

This plugin will launch a unix command upon indigo shutdown signal.

You define the unix command.

How is it done:

The plugin method "shutdown()" is called by indigo during plugin shutdown

The method then checks if the string "Quitting Indigo Server - stopping plugins" is found in indigo log ( in the last 150 lines) to confirm that indigo is shutting down.
Then, as a cross check, also if there is NO string "Loading plugin" after the"Quitting Indigo..." string in indigo log to avoid any old string used as trigger.

Then with
subprocess(<your command>, shell =True)
your unix command is launched.

You define the unix <your command> in config. It must be fully qualified = whole path to the executables etc.

There is also a variable "shutdown_action_enabled" created by the plugin.
setting that to 1 or yes or true (lower or upper case is fine) will enable <your command>
If there is any other string the plugin will not launch <your command>

Karl

Return to “Karl's Plugins and Scripts”