Running a script on session exit

I am using a TS16 to replace dial in modems. Users ssh into the ts16 and connect to a serial port which connects to a terminal session on another comp. The computer serving up the terminal sessions has a feature that will reboot the terminal session if it sees CD drop. Is there a way to force CD low when a user closes their ssh session? Can a script be set to run on ssh session exit? Any ideas appreciated!

The drop of DCD will close the session, as long as, the cable is wired properly for the desired DCD functionality.

If you are using an 8-wire cable on the port, you will need to activate the altpin setting on the PortServer unit:

#> set flow range=(port_#) altpin=on

If you are using a Digi 10-pin adapter, this setting should remain off.

You can then monitor the signal activity from the PortServer:

#> display port range=(port_#)

This will allow you to confirm that the DCD is asserted and that it is also being dropped when the connection is closed.