projects/aports·blob master · refs

34 lines · 883 B

1#!/sbin/openrc-run
2
3description="A highly scalable, robust native graph database"
4
5: ${cfgdir:="/etc/neo4j"}
6: ${homedir:="/var/lib/neo4j"}
7: ${command_user:="neo4j"}
8: ${retry="TERM/30/KILL/5"}
9: ${rc_ulimit="-n 40000"}
10: ${start_wait:=1000} # milliseconds
11
12command="/usr/bin/neo4j"
13command_args="console $command_args"
14command_background="yes"
15directory="$homedir"
16pidfile="/run/$RC_SVCNAME.pid"
17
18start_stop_daemon_args="--wait $start_wait $start_stop_daemon_args"
19# The leading space is to avoid fallback to $start_stop_daemon_args when this
20# is empty (supervise-daemon doesn't support --wait).
21supervise_daemon_args=" $supervise_daemon_args"
22
23depend() {
24 need localmount net
25 after firewall
26}
27
28start_pre() {
29 export NEO4J_CONF="$cfgdir"
30 export NEO4J_HOME="$homedir"
31
32 # Neo4j writes its own pid file into this directory.
33 checkpath -d -q -m700 -o "$command_user" /run/neo4j
34}