View Single Post
  #2   (View Single Post)  
Old 23rd October 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,506
Default

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
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote