Enebla/Disable Interface by script

Hello, I need disable port2 if port 3 is manualy up.
And if port 3 is down port 2 is activated. canYou help me pls? THX Pitros