--- bin/neo4j.orig	2023-06-26 13:12:30 UTC
+++ bin/neo4j
@@ -33,7 +33,7 @@ PRGDIR=`dirname "$PRG"`
 done
 
 PRGDIR=`dirname "$PRG"`
-BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
+BASEDIR=%%PREFIX%%/neo4j
 
 # Reset the REPO variable. If you need to influence this use the environment setup file.
 REPO=
@@ -116,6 +116,9 @@ fi
   [ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
   [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
 fi
+
+NEO4J_CONF=%%NEO4J_CONFDIR%%
+export NEO4J_CONF
 
 exec "$JAVACMD" -Xmx128m \
   -classpath "$CLASSPATH" \
@@ -125,4 +128,4 @@ exec "$JAVACMD" -Xmx128m \
   -Dapp.home="$BASEDIR" \
   -Dbasedir="$BASEDIR" \
   org.neo4j.server.startup.Neo4jBoot \
-  "$@"
\ No newline at end of file
+  "$@"
