You can replace
Code:
# Create mount point if necessary
if [ ! -e "$MOUNT_PT" ]
then
mkdir "$MOUNT_PT"
fi
with a simpler
Code:
mkdir -p ${MOUNT_PT}
I would echo some information about the actions taken
Code:
# Mount /home/ninjasb@starbox via sshfs
echo $0 Testing connection type for local or ext ...
if ifconfig | grep "$LOCAL_IP_TEST" > /dev/null ; then
echo $0: Using local IP address: ${LOCAL_IP}
IP=${LOCAL_IP}
else
echo $0: Using external IP address : ${EXT_IP}
IP=${EXT_IP}
fi
echo $0 : mounting in progress ....
sshfs ninjasb@"${IP}":/home/ninjasb "$MOUNT_PT" -oreconnect,volname=starbox_ninjasb
Doing something similar for the mpd connection is left as an exercise