#!/usr/bin/env bash
|
|
#
|
|
# neo4j
|
|
#
|
|
# chkconfig: - 58 48
|
|
# description: neo4j
|
|
# processname: neo4j
|
|
|
|
# Source networking configuration
|
|
if [ -f /etc/sysconfig/network ]; then source /etc/sysconfig/network; fi
|
|
|
|
# Exit if networking is not up
|
|
[ "$NETWORKING" = "no" ] && exit
|
|
|
|
start() {
|
|
# neo4j wrapper is smart enough to change user and do similar things.
|
|
/usr/local/bin/neo4j start
|
|
return $?
|
|
}
|
|
|
|
stop() {
|
|
/usr/local/bin/neo4j stop
|
|
return $?
|
|
}
|
|
|
|
restart() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
status() {
|
|
/usr/local/bin/neo4j status
|
|
return $?
|
|
}
|
|
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart)
|
|
restart
|
|
;;
|
|
status)
|
|
status $2
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|restart|status [-v]|}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|