Power backup of BBB

Last year was our first use of BBB to control pixel lights. The remainder of our display is LOR and it has the advantage that they do not loose memory when they are powered down which means anyone can switch on the display. We found that because of the way we set up our display we were forced to leave the BBB powered up all of the time and use the sequencer timing to switch on and off our lights. Ideally what we would like to do is provide a battery backup that would keep the BBB operational and ready for the lights to come on when the main supply is switched on. Any suggestions.

The BBB has a 4 pin connector for a Li-ion battery and a built in charger.
I once built a battery backup system based on this - as far as I recall it was just a shell script. It even included a connection from the temp sense pin on the battery to one of the GPIOs. It worked well enough, though I found it chewed through batteries pretty quickly - quite likely due to the batteries I was using being very old junk rescued from a previous life.

The info is all out there for the searching. I’d start with the datasheet for the PMIC.