Hey Korey - I know you said that you didn't need this any longer, but I wanted to follow up for future forum searchers. I think it might be possible to do this within a plugin depending on what you want to do. Plugins can include an optional
shutdown() method which will be called when the server is shutting down:
- Code: Select all
2024-01-09 15:15:57.842 Application Quitting Indigo Server - received slow quit signal
2024-01-09 15:15:57.848 Application Quitting Indigo Server - stopping plugins
...
2024-01-09 15:15:59.648 Multitool Warning The server is shutting down. <------- this is from the shutdown method in the plugin.
2024-01-09 15:16:00.668 Application Stopped plugin "Multitool 2023.1.0"
What might be an issue is the fact that server tasks are handled asynchronously and -- if the
shutdown() method sends commands to the server -- you can't guarantee that they'll be done in order without some kind of blocking/feedback mechanism. That said, I would think the method could call an Indigo Trigger without any issues. (Someone please correct me if I'm wrong about this.)
By the way, an official
shutdown trigger is on the list for the future.