-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathlaunch.sh
28 lines (22 loc) · 898 Bytes
/
launch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
NEO4J_HOME=/var/lib/neo4j
if [ -n "$NEO4J_AUTH" ]; then
if [ "$NEO4J_AUTH" == "none" ]; then
echo 'disabling authentication'
echo 'dbms.security.auth_enabled=false' >> $NEO4J_HOME/conf/neo4j-server.properties
else
echo "will use custom credentials"
mkdir -p $NEO4J_HOME/data/dbms
echo -n $NEO4J_AUTH | ./build_auth_string.sh > $NEO4J_HOME/data/dbms/auth
fi
fi
sed -i "s|#org.neo4j.server.webserver.address=0.0.0.0|org.neo4j.server.webserver.address=$HOSTNAME|g" $NEO4J_HOME/conf/neo4j-server.properties
# doing this conditionally in case there is already a limit higher than what
# we're setting here. neo4j recommends at least 40000.
#
# (http://neo4j.com/docs/1.6.2/configuration-linux-notes.html#_setting_the_number_of_open_files)
limit=`ulimit -n`
if [ "$limit" -lt 65536 ]; then
ulimit -n 65536;
fi
exec .$NEO4J_HOME/bin/neo4j console