How do you make a component only be on when a capacitor powers it?
You need a way to differentiate between "powered from an external source" and "powered from capacitor only" -- a transistor, diode and a pair of resistors can do this for you.



The PNP transistor will remain off for as long as 12V is present. The diode allows the capacitor to charge but prevents the capacitor voltage from feeding the base of the transistor. R1 is a weak pull-down which turns the transistor on when the stronger pull-up R2 has no source voltage.