#!/bin/sh

[ "$IFACE" == "hso0" ] || exit 0

[ -f /tmp/hso-connect ] || exit 0

PID=$(cat /tmp/hso-connect)
ps | grep "$PID" | grep -q hso-connect.sh && kill "$PID"
comgt -s -d /dev/ttyHS0 /etc/comgt/hsodisconnect.comgt
rm -f /tmp/hso-connect
ip address flush hso0
ip link set hso0 down