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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
--- bin/neo4j.orig 2012-04-24 09:25:46.000000000 -0300
+++ bin/neo4j 2012-04-24 15:26:38.000000000 -0300
@@ -51,26 +51,25 @@
function parseConfig {
if [ ${BASH_VERSINFO[0]} -eq 3 ] ; then
if [ ${BASH_VERSINFO[1]} -lt 2 ] ; then
- getconfigquoted "${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"
- getconfigquoted "${NEO4J_INSTANCE}/conf/neo4j-server.properties"
+ getconfigquoted "/etc/neo4j/neo4j-wrapper.conf"
+ getconfigquoted "/etc/neo4j/neo4j-server.properties"
return
fi
fi
- getconfig "${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"
- getconfig "${NEO4J_INSTANCE}/conf/neo4j-server.properties"
+ getconfig "/etc/neo4j/neo4j-wrapper.conf"
+ getconfig "/etc/neo4j/neo4j-server.properties"
}
findBaseDirAndCdThere
source bin/utils
parseConfig
-NEO4J_OPTS="-Dlog4j.configuration=file:conf/log4j.properties -Dorg.neo4j.server.properties="${NEO4J_INSTANCE}"/conf/neo4j-server.properties -Djava.util.logging.config.file="${NEO4J_INSTANCE}/conf/logging.properties" -Dneo4j.home="${NEO4J_HOME}" -Dneo4j.instance="${NEO4J_INSTANCE}""
+NEO4J_OPTS="-Dlog4j.configuration=file:/etc/neo4j/log4j.properties -Dorg.neo4j.server.properties=/etc/neo4j/neo4j-server.properties -Djava.util.logging.config.file="/etc/neo4j/logging.properties" -Dneo4j.home="${NEO4J_HOME}" -Dneo4j.instance="${NEO4J_INSTANCE}""
JAVA_OPTS="-server -XX:+DisableExplicitGC ${wrapper_java_additional}"
[ -z "${wrapper_java_initmemory}" ] || JAVA_OPTS="$JAVA_OPTS -Xms${wrapper_java_initmemory}m"
[ -z "${wrapper_java_maxmemory}" ] || JAVA_OPTS="$JAVA_OPTS -Xmx${wrapper_java_maxmemory}m"
-#NEO4J_SERVER_PORT=`( egrep "^org.neo4j.server.webserver.port" $NEO4J_INSTANCE/conf/neo4j-server.properties || echo 7474 ) | sed -e 's/.*=//'`
NEO4J_SERVER_PORT=${org_neo4j_server_webserver_port:=7474}
LAUNCHD_NAME="${LAUNCHD_NAME}.${NEO4J_SERVER_PORT}"
@@ -92,7 +91,7 @@
TIMEOUT=20
-PID_FILE=${NEO4J_INSTANCE}/data/neo4j-service.pid
+PID_FILE=/var/db/neo4j/neo4j-service.pid
buildclasspath() {
# confirm library jars
LIBDIR="$NEO4J_HOME"/lib
@@ -140,16 +139,16 @@
checkupgrade() {
if [ $UID == 0 ] ; then
- su $NEO4J_USER -c "$JAVACMD -cp '$CLASSPATH' $JAVA_OPTS -Dlog4j.configuration=file:conf/log4j.properties \
- -Dorg.neo4j.server.properties=\"${NEO4J_INSTANCE}/conf/neo4j-server.properties\" \
- -Djava.util.logging.config.file=\"${NEO4J_INSTANCE}/conf/logging.properties\" \
+ su $NEO4J_USER -c "$JAVACMD -cp '$CLASSPATH' $JAVA_OPTS -Dlog4j.configuration=file:/etc/neo4j/log4j.properties \
+ -Dorg.neo4j.server.properties=\"/etc/neo4j/neo4j-server.properties\" \
+ -Djava.util.logging.config.file=\"/etc/neo4j/logging.properties\" \
-Dneo4j.home=\"${NEO4J_HOME}\" -Dneo4j.instance=\"${NEO4J_INSTANCE}\" \
org.neo4j.server.storemigration.PreStartupStoreUpgrader"
else
checkwriteaccess
- $JAVACMD -cp "${CLASSPATH}" $JAVA_OPTS -Dlog4j.configuration=file:conf/log4j.properties \
- -Dorg.neo4j.server.properties="${NEO4J_INSTANCE}/conf/neo4j-server.properties" \
- -Djava.util.logging.config.file="${NEO4J_INSTANCE}/conf/logging.properties" \
+ $JAVACMD -cp "${CLASSPATH}" $JAVA_OPTS -Dlog4j.configuration=file:/etc/neo4j/log4j.properties \
+ -Dorg.neo4j.server.properties="/etc/neo4j/neo4j-server.properties" \
+ -Djava.util.logging.config.file="/etc/neo4j/logging.properties" \
-Dneo4j.home="${NEO4J_HOME}" -Dneo4j.instance="${NEO4J_INSTANCE}" \
org.neo4j.server.storemigration.PreStartupStoreUpgrader
fi
@@ -200,20 +199,20 @@
checkandrepairenv
if [ $UID == 0 ] ; then
- su $NEO4J_USER -c "$JAVACMD -cp '$CLASSPATH' $JAVA_OPTS -Dlog4j.configuration=file:conf/log4j.properties \
- -Dorg.neo4j.server.properties=\"${NEO4J_INSTANCE}/conf/neo4j-server.properties\" \
- -Djava.util.logging.config.file=\"${NEO4J_INSTANCE}/conf/logging.properties\" \
+ su $NEO4J_USER -c "$JAVACMD -cp '$CLASSPATH' $JAVA_OPTS -Dlog4j.configuration=file:/etc/neo4j/log4j.properties \
+ -Dorg.neo4j.server.properties=\"/etc/neo4j/neo4j-server.properties\" \
+ -Djava.util.logging.config.file=\"/etc/neo4j/conf/logging.properties\" \
-Dneo4j.home=\"${NEO4J_HOME}\" -Dneo4j.instance=\"${NEO4J_INSTANCE}\" \
-Dfile.encoding=UTF-8 \
- org.neo4j.server.Bootstrapper >> \"$NEO4J_INSTANCE/data/log/console.log\" 2>&1 & echo \$! > \"$PID_FILE\" "
+ org.neo4j.server.Bootstrapper >> \"/var/db/neo4j/log/console.log\" 2>&1 & echo \$! > \"$PID_FILE\" "
else
checkwriteaccess
echo "WARNING: not changing user"
- $JAVACMD -cp "${CLASSPATH}" $JAVA_OPTS -Dlog4j.configuration=file:conf/log4j.properties \
- -Dorg.neo4j.server.properties="${NEO4J_INSTANCE}/conf/neo4j-server.properties" \
- -Djava.util.logging.config.file="${NEO4J_INSTANCE}/conf/logging.properties" \
+ $JAVACMD -cp "${CLASSPATH}" $JAVA_OPTS -Dlog4j.configuration=file:/etc/neo4j/log4j.properties \
+ -Dorg.neo4j.server.properties="/etc/neo4j/neo4j-server.properties" \
+ -Djava.util.logging.config.file="/etc/neo4j/logging.properties" \
-Dneo4j.home="${NEO4J_HOME}" -Dneo4j.instance="${NEO4J_INSTANCE}" \
- org.neo4j.server.Bootstrapper >> "${NEO4J_INSTANCE}/data/log/console.log" 2>&1 & echo $! > "${PID_FILE}"
+ org.neo4j.server.Bootstrapper >> "/var/db/neo4j/log/console.log" 2>&1 & echo $! > "${PID_FILE}"
fi
STARTED_PID=$( cat "$PID_FILE" )
@@ -274,9 +273,9 @@
checkwriteaccess
checkandrepairenv
- $JAVACMD -cp "${CLASSPATH}" $JAVA_OPTS -Dlog4j.configuration=file:conf/log4j.properties \
- -Dorg.neo4j.server.properties="${NEO4J_INSTANCE}/conf/neo4j-server.properties" \
- -Djava.util.logging.config.file="${NEO4J_INSTANCE}/conf/logging.properties" \
+ $JAVACMD -cp "${CLASSPATH}" $JAVA_OPTS -Dlog4j.configuration=file:/etc/neo4j/log4j.properties \
+ -Dorg.neo4j.server.properties="/etc/neo4j/neo4j-server.properties" \
+ -Djava.util.logging.config.file="/etc/neo4j/logging.properties" \
-Dneo4j.home="${NEO4J_HOME}" -Dneo4j.instance="${NEO4J_INSTANCE}" \
org.neo4j.server.Bootstrapper
@@ -291,16 +290,16 @@
# pass in "true" for created to mark that the user was created (instead than pre-existing)
modify_user_config() {
created=${2:-"false"}
- if `grep -q "wrapper\.user=" "$NEO4J_INSTANCE/conf/neo4j-wrapper.conf"` ; then
- sed -i -e "s/^.*wrapper\.user=.*$/wrapper\.user=$1/" "$NEO4J_INSTANCE/conf/neo4j-wrapper.conf"
+ if `grep -q "wrapper\.user=" "/etc/neo4j/neo4j-wrapper.conf"` ; then
+ sed -i -e "s/^.*wrapper\.user=.*$/wrapper\.user=$1/" "/etc/neo4j/neo4j-wrapper.conf"
else
- echo "wrapper.user=$1" >> "$NEO4J_INSTANCE/conf/neo4j-wrapper.conf"
+ echo "wrapper.user=$1" >> "/etc/neo4j/neo4j-wrapper.conf"
fi
- if `grep -q "wrapper\.user\.created=" "$NEO4J_INSTANCE/conf/neo4j-wrapper.conf"` ; then
- sed -i -e "s/^.*wrapper\.user\.created=.*$/wrapper\.user\.created=${created}/" "$NEO4J_INSTANCE/conf/neo4j-wrapper.conf"
+ if `grep -q "wrapper\.user\.created=" "/etc/neo4j/neo4j-wrapper.conf"` ; then
+ sed -i -e "s/^.*wrapper\.user\.created=.*$/wrapper\.user\.created=${created}/" "/etc/neo4j/neo4j-wrapper.conf"
else
- echo "wrapper.user.created=${created}" >> "$NEO4J_INSTANCE/conf/neo4j-wrapper.conf"
+ echo "wrapper.user.created=${created}" >> "/etc/neo4j/neo4j-wrapper.conf"
fi
}
@@ -363,7 +362,7 @@
fi
ln -s "${SCRIPT_NAME}" "/etc/init.d/${SERVICE_NAME}"
update-rc.d ${SERVICE_NAME} defaults
- chown -R $proposed_user: "$NEO4J_HOME/data" "$NEO4J_HOME/conf"
+ chown -R $proposed_user: "/var/db/neo4j" "/etc/neo4j"
fi
fi
elif [[ $DIST_OS -eq "macosx" ]] ; then
|