#!/bin/bash function die () { echo echo "***" echo "*** Fatal error: $*" echo "***" exit 1 } if [ $1 = "start" -o $1 = "install" ]; then cd "${MY_INSTALLDIR}" || die if ( test -e data ); then chmod 666 data else echo "Error: unable to find data directory." fi fi