# is an overlay of the subhost's root and an OS root. The service
# subhost is defined by a configuration file named on teh command line
-OVERLAYDIR="$(realpath $(dirname $0))"
+OVERLAYDIR="$(dirname $(realpath $0))"
[ $(id -u) = 0 ] || exec sudo $0 $@
-. $(dirname $(realpath $0))/functions $*
+. $OVERLAYDIR/functions $*
CONFIG="$1"
[ -r "$CONFIG" ] || die "Missing configuration $CONFIG"