#!/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/etc/ax25:/usr/local/ax25 echo "Starting direwolf" direwolf -t 0 -c /home/xavier/dwcm108.conf -p & #Check if Direwolf is running sleep 5 if [ -z "`ps ax | grep -v grep | grep direwolf`" ]; then echo -e "\nERROR: Direwolf did not start properly and is not running, please review direwolf.conf" exit 1 fi echo "Installing one KISS connection on PTY port /tmp/kisstnc" /usr/sbin/mkiss -s 1200 -x 1 /tmp/kisstnc > /tmp/unix98 #This creates a PTS interface like "/dev/pts/3" export PTS0=`more /tmp/unix98 | grep -w /dev | cut -b -11` echo "PTS0 device: $PTS0" /usr/sbin/kissattach $PTS0 ax0 > /tmp/ax25-config.tmp awk '/device/ { print $7 }' /tmp/ax25-config.tmp > /tmp/ax25-config1-tmp read Device < /tmp/ax25-config1-tmp