@jackie_w:
I may have skimmed the code a wee bit too fast...
* Yeah, it only writes the state to the config if
retainStateOverRestart is enabled in the
[state] section... :/.
* I may have totally missed how the parser handled ini sections...

.
i.e., the test should probably be
grep -q "invertActive = yes", since state is the section, so, a
[state] header, and not a
state: prefix like it's handled in the code.
----
Random comment: since here, both -C & -B are passed, one could also simply invert the arguments instead of using -h

. (Not that there's anything wrong with -h: I checked

).