The safest way is if the district approves a stipend specifically meant for you, the director, to write the show music. If they just approve a general budget for show music that could be paid to anyone, then you decide to pay yourself to do it, that is a potential conflict of interest. Many a politician and CEO has gone down using their decision-making power to pack their own wallets.
If the boosters are paying, it's still precarious. You may not have a vote in their decisions, but you have implicit influence over them that you shouldn't abuse. You are teaching their children, giving grades, awarding or denying opportunities, etc. Also, the purpose of the boosters is to serve your program, an entity over which you have control. When you influence the boosters to pay you for a related or unrelated job, you are again tacitly using your position to pad your own pockets. It's not that it doesn't make sense for you (a person who knows your students abilities well) to write the music for them. The problem is that both well-intentioned and self-serving individuals will claim they are the best choice. You don't want to appear to be the latter.
In years when I've felt my students were best served by having a customized music/show written by myself (and that has happened several times when working with weaker/smaller groups), then I've done it without pay. It's the safest way. If you view your time as too valuable to give away, find someone else to write the music. If you want to exercise your creative skills in this area, work on getting hired by another program, not by your own.
Having said all of that, in certain districts or situations that are uniquely non-political, you can get away with this and everyone will be happy. That doesn't describe most situations. It only takes one critic to open up this can of worms and despite your good intentions, you will appear to be self-dealing.