| 1 | #! /bin/sh |
| 2 | # |
| 3 | # Kill connection on actual channel (very hard disconnect) |
| 4 | # |
| 5 | |
| 6 | LPAPI="lpapi" |
| 7 | |
| 8 | #Test if LinPac is running |
| 9 | $LPAPI 0 |
| 10 | if [ ! $? -eq 0 ]; then |
| 11 | echo LinPac is not running |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
| 15 | #Test if the channel is connected |
| 16 | if [ `$LPAPI $LPCHN state` -eq 0 ]; then |
| 17 | echo Channel is not connected |
| 18 | exit 1 |
| 19 | fi |
| 20 | |
| 21 | #Get channel data |
| 22 | CALL=`$LPAPI $LPCHN call` |
| 23 | CWIT=`$LPAPI $LPCHN cwit` |
| 24 | PORT=`$LPAPI $LPCHN port` |
| 25 | PNAME=`$LPAPI $LPCHN pname $PORT` |
| 26 | |
| 27 | #Kill the connection |
| 28 | axctl $PNAME $CWIT $CALL -kill |