/etc/wfe/conf/ipsecconnections There you will find all your IPSec-Connections. You can disable or enable one by settings "status = 0" or "status = 1".
For example make a cronjob (in /etc/crontab.yourname) that replaces the existing /etc/wfe/conf/ipsecconnections with another one. Then "sleep 5". Then replace the conf again.
Do you know what I mean. You could make a perl-script, too.