There’s no built-in trigger to start a rule on system shutdown, because the rule engine gets killed pretty quickly. If you’re shutting down with an openHAB rule, then you can add the HTTP command to it (before your shutdown/reboot command) and set up a separate rule that runs on startup to revert.
Of course, this only works if you intentionally shut down your server, and not if it crashes or loses power.
I can’t help you with this specific idea, but really what you’re talking about is monitoring openHAB. You can find discussions about that in the community, such as this one. They’re likely more than you want/need, but you might get some ideas.
Good luck!