Hi there,
I have almost finished work on my first plugin and I am currently testing the behavior during different system events.
Since my Plugin reserves system resources in onStart
and releases them again in onStop
, I try to sanity check if it works properly in all situations.
Events tested and the behavior I observe:
-
volumio vrestart
: Seems not to callonStop
but callsonStart
when restarting -
volumio vstop
: Seems not to callonStop
-
volumio vstart
: CallsonStart
- Deactivate Plugin in the web-interface: calls
onStop
- Activate Plugin in the web-interface: calls
onStart
-
onRestart
seems never to be called (I write a log message there, which never shows up in any log)
This seems to be a bit inconsistent to me, because in my case system resources are not properly released on vrestart
and vstop
and thus the plugin does not properly start after either was called. I already check if the resources are free, but since I cannot know, if somebody else is using them, I abort my plugins start process if they are not available.
Is this design done on purpose? Any hint, what would be a potential workaround to catch vrestart
and vstop
and release the resources?
Thanks!
Thomas