Put a relay inbetween the alternator and the 2nd battery that is triggered by a switched source off the ignition. While the car is running, the relay will close and it will be one combined circuit (and thus get charged and when the car is off, the relay will open and disconnect the two circuits leaving you to drain the 2nd battery.