#!/bin/sh
##
##  neo4j-server.sh -- Neo4J Server Startup Wrapper
##

cp=""
for file in \
    @l_prefix@/lib/neo4j/server/*.jar \
    @l_prefix@/lib/neo4j/plugin/*.jar; do
    if [ -f $file ]; then
        if [ ".$cp" = . ]; then
            cp="$file"
        else
            cp="$cp:$file"
        fi
    fi
done

exec @l_prefix@/bin/java \
    -Vsun-jdk -Xms1024m -Xmx2048m -cp "$cp" \
    -Dlog4j.configuration=file:@l_prefix@/etc/neo4j/neo4j-log4j.properties \
    org.neo4j.server.CommunityEntryPoint \
    --home-dir=@l_prefix@/var/neo4j \
    --config-dir=@l_prefix@/etc/neo4j \
    ${1+"$@"}

