#!/bin/bash --
#
dirdirname=`dirname "$0" | sed -e 's|/bin$||'`
if [ $? -ne 0 ]; then exit 1; fi

cd "$dirdirname"
if [ $? -ne 0 ]; then exit 2; fi

if [ ! -L datadir-on-local-filesystem ]; then exit 3; fi
if [ ! -d datadir-on-local-filesystem/ ]; then exit 4; fi
if [ ! -x bin/bitcoind ]; then exit 5; fi

exec bin/bitcoind -datadir=datadir-on-local-filesystem "$@"
