hibari/hibari — Issue #11: problem if running from sym link of hibari script
Author: kwidoyo
Created: 2011-12-22 03:36:27+00:00
State: open

e.g.:
$ sudo ln -s /usr/local/var/lib/hibari/hibari/bin/hibari /etc/init.d/gogogo

then we can not run hibari by executing /etc/init.d/gogogo

Issue:
- hibari script uses $0 and pwd for variable declaration.

As a workaround, edit the hibari script as follows:
....
#RUNNER_SCRIPT_DIR=$(cd ${0%/*} && pwd)

#RUNNER_BASE_DIR=${RUNNER_SCRIPT_DIR%/*}

RUNNER_BASE_DIR="/usr/local/var/lib/hibari/hibari/"
RUNNER_SCRIPT_DIR=$RUNNER_BASE_DIR/bin
...
#SCRIPT=`basename $0`
SCRIPT="hibari"
....