I'm attempting to have a slightly more organized openswan logging system and I think I've over thought it. I'm really just trying to save username and public IPs. This is what I so far but it's still returning more data than I need and I'd rather not build a complicated parser. I imagine there has got to be a way to get just this info without getting to overly complicated.
ipsec auto --status | grep 'STATE_MAIN_R3' > /home/ipsec.log
Please help!