Can a military career be ethical? There are military generals as lay people and stream enterers in the suttas. And there is no clear prohibition to a military career. There are some suttas that criticize the karma of soldiers on the battlefield.

My question is, since being a military general is acceptable livelihood, what should he do? Could he planning for war, making war, or just sit there and do nothing since both of those actions could lead to indirect killing?

If he does nothing, that can lead to catastrophic results and even more people maybe get killed. Is that right livelihood if other people rely on him and he has the responsibility to use military force to protect people?
There is this section on being a warrior regarding right livelihood.

Right Livelihood : samma ajivo
http://www.accesstoinsight.org/ptf/dhamma/sacca/sacca4/samma-ajivo/

Considering becoming a soldier? You may want to reconsider...

Then Yodhajiva the headman went to the Blessed One and, on arrival, having bowed down to him, sat to one side. As he was sitting there he said to the Blessed One: "Lord, I have heard that it has been passed down by the ancient teaching lineage of warriors that 'When a warrior strives &amp; exerts himself in battle, if others then strike him down &amp; slay him while he is striving &amp; exerting himself in battle, then with the breakup of the body, after death, he is reborn in the company of devas slain in battle.' What does the Blessed One have to say about that?"

"Enough, headman, put that aside. Don't ask me that."

A second time... A third time Yodhajiva the headman said: "Lord, I have heard that it has been passed down by the ancient teaching lineage of warriors that 'When a warrior strives &amp; exerts himself in battle, if others then strike him down &amp; slay him while he is striving &amp; exerting himself in battle, then with the breakup of the body, after death, he is reborn in the company of devas slain in battle.' What does the Blessed One have to say about that?"

"Apparently, headman, I haven't been able to get past you by saying, 'Enough, headman, put that aside. Don't ask me that.' So I will simply answer you. When a warrior strives &amp; exerts himself in battle, his mind is already seized, debased, &amp; misdirected by the thought: 'May these beings be struck down or slaughtered or annihilated or destroyed. May they not exist.' If others then strike him down &amp; slay him while he is thus striving &amp; exerting himself in battle, then with the breakup of the body, after death, he is reborn in the hell called the realm of those slain in battle. But if he holds such a view as this: 'When a warrior strives &amp; exerts himself in battle, if others then strike him down &amp; slay him while he is striving &amp; exerting himself in battle, then with the breakup of the body, after death, he is reborn in the company of devas slain in battle,' that is his wrong view. Now, there are two destinations for a person with wrong view, I tell you: either hell or the animal womb."

When this was said, Yodhajiva the headman sobbed &amp; burst into tears. [The Blessed One said:] "That is what I couldn't get past you by saying, 'Enough, headman, put that aside. Don't ask me that.'"

"I'm not crying, lord, because of what the Blessed One said to me, but simply because I have been deceived, cheated, &amp; fooled for a long time by that ancient teaching lineage of warriors who said: 'When a warrior strives &amp; exerts himself in battle, if others then strike him down &amp; slay him while he is striving &amp; exerting himself in battle, then with the breakup of the body, after death, he is reborn in the company of devas slain in battle.'

— SN 42.3