Advertisement
Guest User

Untitled

a guest
Jul 8th, 2011
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 16.49 KB | None | 0 0
  1.  
  2. #!/bin/bash
  3. ### BEGIN INIT INFO
  4. # Provides:          neo4j-service
  5. # Required-Start:
  6. # Required-Stop:
  7. # Default-Start:     2 3 4 5
  8. # Default-Stop:      0 1 6
  9. ### END INIT INFO
  10.  
  11. # Copyright (c) 2002-2011 "Neo Technology,"
  12. # Network Engine for Objects in Lund AB [http://neotechnology.com]
  13. #
  14. # This file is part of Neo4j.
  15. #
  16. # Neo4j is free software: you can redistribute it and/or modify
  17. # it under the terms of the GNU General Public License as published by
  18. # the Free Software Foundation, either version 3 of the License, or
  19. # (at your option) any later version.
  20. #
  21. # This program is distributed in the hope that it will be useful,
  22. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24. # GNU General Public License for more details.
  25. #
  26. # You should have received a copy of the GNU General Public License
  27. # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  28.  
  29.  
  30. # getconfig <filename>
  31. #   - plain key-value pairs become environment variables
  32. #   - keys have '.' chars changed to '_'
  33. #   - keys of the form KEY.# (where # is a number) are concatenated
  34. #     into a single environment variable named KEY
  35. function getconfig {
  36.   if [ -e '$1' ]; then
  37.     while read line; do
  38.       if [[ ${line} =~ "^([^#\s][^=]+)=(.+)$" ]]; then
  39.         key=`echo ${BASH_REMATCH[1]} | sed 's/\./_/g'`
  40.         value="${BASH_REMATCH[2]}"
  41.         if [[ ${key} =~ "^(.*)_([0-9]+)$" ]]; then
  42.           key=${BASH_REMATCH[1]}
  43.           if [[ ${!key} ]]; then
  44.             export ${key}="${!key} ${value}"
  45.           else
  46.             export ${key}="$value"
  47.           fi
  48.         else
  49.           export ${key}="${value}"
  50.         fi
  51.       fi
  52.  
  53.     done < $1
  54.   fi
  55. }
  56.  
  57. NEO4J_SCRIPT=$0
  58.  
  59. cd `dirname $NEO4J_SCRIPT`
  60. NEO4J_SCRIPT=`basename $NEO4J_SCRIPT`
  61.  
  62. while [ -L "$NEO4J_SCRIPT" ]
  63. do
  64.   NEO4J_SCRIPT=$( readlink $NEO4J_SCRIPT )
  65.   cd `dirname $NEO4J_SCRIPT`
  66.   NEO4J_SCRIPT=`basename $NEO4J_SCRIPT`
  67. done
  68. NEO4J_HOME=`cd $( dirname $NEO4J_SCRIPT )/.. && dirs -l +0`
  69. NEO4J_INSTANCE=$NEO4J_HOME
  70.  
  71. cd "$NEO4J_HOME"
  72.  
  73. getconfig "${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"
  74. getconfig "${NEO4J_INSTANCE}/conf/neo4j-server.properties"
  75.  
  76. 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}""
  77. JAVA_OPTS="-server ${wrapper_java_additional}"
  78. #NEO4J_SERVER_PORT=`( egrep "^org.neo4j.server.webserver.port" $NEO4J_INSTANCE/conf/neo4j-server.properties || echo 7474 ) | sed -e 's/.*=//'`
  79. NEO4J_SERVER_PORT=${org_neo4j_server_webserver_port:=7474}
  80.  
  81. if [ -z "${wrapper_user}" ]; then
  82.   NEO4J_USER=`id -un`
  83. else
  84.   NEO4J_USER=${wrapper_user}
  85. fi
  86.  
  87. SCRIPT_NAME="${NEO4J_HOME}/bin/neo4j"
  88. SERVICE_NAME=${wrapper_ntservice_name:=neo4j-service}
  89. LAUNCHD_DIR=~/Library/LaunchAgents/
  90.  
  91. TIMEOUT=20
  92.  
  93. PID_FILE=${NEO4J_INSTANCE}/data/neo4j-service.pid
  94.  
  95. # Detect java and set JAVACMD on successful find.
  96. findjava() {
  97.   # OS specific support.  $var _must_ be set to either true or false.
  98.   cygwin=false;
  99.   darwin=false;
  100.   case "`uname`" in
  101.     CYGWIN*) cygwin=true ;;
  102.     Darwin*) darwin=true
  103.            if [ -z "$JAVA_VERSION" ] ; then
  104.              JAVA_VERSION="CurrentJDK"
  105.            else
  106.              echo "Using Java version: $JAVA_VERSION"
  107.            fi
  108.            if [ -z "$JAVA_HOME" ] ; then
  109.              JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
  110.            fi
  111.            ;;
  112.   esac
  113.  
  114.   if [ -z "$JAVA_HOME" ] ; then
  115.     if [ -r /etc/gentoo-release ] ; then
  116.       JAVA_HOME=`java-config --jre-home`
  117.     fi
  118.   fi
  119.  
  120.   # For Cygwin, ensure paths are in UNIX format before anything is touched
  121.   if $cygwin ; then
  122.     [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  123.     [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  124.   fi
  125.  
  126.   # If a specific java binary isn't specified search for the standard 'java' binary
  127.   if [ -z "$JAVACMD" ] ; then
  128.     if [ -n "$JAVA_HOME"  ] ; then
  129.       if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
  130.         # IBM's JDK on AIX uses strange locations for the executables
  131.         JAVACMD="$JAVA_HOME/jre/sh/java"
  132.       else
  133.         JAVACMD="$JAVA_HOME/bin/java"
  134.       fi
  135.     else
  136.       JAVACMD=`which java`
  137.     fi
  138.   fi
  139. }
  140.  
  141. # Use findjava to set JAVACMD. If that fails ($JAVACMD is not set) then exit with failure
  142. exitonnojava() {
  143.   findjava
  144.   if [ ! -x "$JAVACMD" ] ; then
  145.     echo "Error: JAVA_HOME is not defined correctly."
  146.     echo "  We cannot execute $JAVACMD"
  147.     exit 1
  148.   fi
  149. }
  150.  
  151. # Resolve the os
  152. detectos() {
  153.   DIST_OS=`uname -s | tr [A-Z] [a-z] | tr -d ' '`
  154.   case "$DIST_OS" in
  155.     'sunos')
  156.       DIST_OS="solaris"
  157.       ;;
  158.     'hp-ux' | 'hp-ux64')
  159.       # HP-UX needs the XPG4 version of ps (for -o args)
  160.       DIST_OS="hpux"
  161.       UNIX95=""
  162.       export UNIX95  
  163.       ;;
  164.     'darwin')
  165.       DIST_OS="macosx"
  166.       ;;
  167.     'unix_sv')
  168.       DIST_OS="unixware"
  169.       ;;
  170.     'os/390')
  171.       DIST_OS="zos"
  172.       ;;
  173.     'cygwin')
  174.       DIST_OS="cygwin"
  175.       ;;
  176.   esac
  177. }
  178.  
  179. buildclasspath() {
  180.   # confirm library jars
  181.   LIBDIR="$NEO4J_HOME"/lib
  182.   if [ ! -e "$LIBDIR" ] ; then
  183.     echo "Error: missing Neo4j Library, expected at $LIBDIR"
  184.     exit 1
  185.   fi
  186.  
  187.   # confirm system jars
  188.   SYSLIBDIR="$NEO4J_HOME"/system/lib
  189.   if [ ! -e "$SYSLIBDIR" ] ; then
  190.     echo "Error: missing Neo4j System Library, expected at $SYSLIBDIR"
  191.     exit 1
  192.   fi
  193.  
  194.   ALL_JARS=""
  195.   for jar in "$LIBDIR"/*.jar "$SYSLIBDIR"/*.jar ; do
  196.     [ -z "$ALL_JARS" ] && ALL_JARS="$jar" || ALL_JARS="$ALL_JARS":"$jar"
  197.   done
  198.  
  199.   # add any plugin jars
  200.   for jar in "$NEO4J_HOME"/plugins/*.jar ; do
  201.     if [ -e "$jar" ] ; then
  202.       ALL_JARS="$ALL_JARS":"$jar"
  203.     fi
  204.   done
  205.  
  206.   if [ -e "$NEO4J_HOME"/system/coordinator/lib ]; then
  207.     for jar in "$NEO4J_HOME"/system/coordinator/lib/*.jar ; do
  208.       if [ -e "$jar" ] ; then
  209.         ALL_JARS="$ALL_JARS":"$jar"
  210.       fi
  211.     done
  212.   fi
  213.  
  214.   CLASSPATH=${ALL_JARS}
  215. }
  216.  
  217. checkstatus() {
  218.   if [ -e "$PID_FILE" ] ; then
  219.     NEO4J_PID=$( cat "$PID_FILE" )
  220.     kill -0 $NEO4J_PID 2>/dev/null || NEO4J_PID=
  221.   fi
  222. }
  223.  
  224. checkwriteaccess() {
  225.     if [ $UID != 0 ] ; then
  226.     if [ ! -w "$NEO4J_INSTANCE/data" ] ; then
  227.       echo "ERROR: No write access to data/ directory, run either as user $NEO4J_USER or root"
  228.       exit 1
  229.     fi
  230.     fi
  231. }
  232.  
  233. getlaunchdpid() {
  234.   LAUNCHDPID=$(launchctl list | grep org.neo4j.server | cut -f 1)
  235.   if [ -z $LAUNCHDPID ] ; then
  236.     # Not there
  237.     LAUNCHDPID=-1
  238.   elif [ $LAUNCHDPID = "-" ] ; then
  239.     # There but not running
  240.     LAUNCHDPID=0
  241.   else
  242.     # There and running
  243.     LAUNCHDPID=$(($LAUNCHDPID))
  244.   fi
  245. }
  246.  
  247. startit() {
  248.  
  249.   detectos
  250.   exitonnojava
  251.   checkstatus
  252.  
  253.   if [ $DIST_OS = "macosx" ] ; then
  254.     getlaunchdpid
  255.     if [ $LAUNCHDPID -eq 0 ] ; then
  256.       echo "Detected installation in launchd, starting it..."
  257.       launchctl start org.neo4j.server
  258.       exit 0
  259.     elif [ $LAUNCHDPID -gt 0 ] ; then
  260.       echo "Instance already running via launchd with PID $LAUNCHDPID"
  261.       exit 1
  262.     fi
  263.     # We fall through here since if there is no launchd install we start manually
  264.   fi
  265.  
  266.   if [ -z $NEO4J_PID ] ; then
  267.     printf "Starting neo4j-service..."
  268.  
  269.     buildclasspath
  270.  
  271.     if [ $UID == 0 ] ; then
  272.       su $NEO4J_USER -c "$JAVACMD -cp '$CLASSPATH' $JAVA_OPTS $NEO4J_OPTS org.neo4j.server.Bootstrapper >> '$NEO4J_INSTANCE/data/log/console.log' 2>&1 & echo \$! > '$PID_FILE' "
  273.     else
  274.       checkwriteaccess
  275.       echo "WARNING: not changing user"
  276.       $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" -Dneo4j.home="${NEO4J_HOME}" -Dneo4j.instance="${NEO4J_INSTANCE}" org.neo4j.server.Bootstrapper >> "${NEO4J_INSTANCE}/data/log/console.log" 2>&1 & echo $! > "${PID_FILE}"
  277.     fi
  278.     STARTED_PID=$( cat "$PID_FILE" )
  279.  
  280.     printf " process [$STARTED_PID]... waiting for server to be ready."
  281.  
  282.     x=0
  283.     while ( [ $x -lt 120 ] ) ; do
  284.       ## wait for start
  285.       ## This could be achieved with filtering using -sTCP:LISTEN but this option is not available
  286.       ## on lsof v4.78 which is the one bundled with some distros. So we have to do this grep below
  287.       newpid=$(lsof -i :$NEO4J_SERVER_PORT -F T -Ts | grep -i "TST=LISTEN" -B1 | head -n1)
  288.       newpid=${newpid:1}
  289.       if [ $newpid ] ; then
  290.          break
  291.       fi
  292.  
  293.       kill -0 $STARTED_PID 2> /dev/null || break
  294.       printf "."
  295.       sleep 1
  296.       x=$[$x +1]
  297.     done
  298.  
  299.     if kill -0 $STARTED_PID 2>/dev/null ; then
  300.       if [ "$newpid" != "$STARTED_PID" ] ; then
  301.         rm "$PID_FILE"
  302.         kill -9 $STARTED_PID
  303.         echo " BAD."
  304.         echo " another server-process is running with [$newpid]"
  305.         exit 2
  306.       fi
  307.  
  308.       echo " OK."
  309.       exit 0
  310.     fi
  311.  
  312.     echo " BAD."
  313.     echo "Server may have failed to start, please check the logs."
  314.     rm "$PID_FILE"
  315.     exit 1
  316.   else
  317.     echo "Server already running with pid $NEO4J_PID"
  318.     exit 1
  319.   fi
  320. }
  321.  
  322.  
  323. stopit() {
  324.  
  325.   detectos
  326.   checkstatus
  327.   checkwriteaccess
  328.  
  329.   if [ $DIST_OS = "macosx" ] ; then
  330.     getlaunchdpid
  331.     if [ $LAUNCHDPID -gt 0 ] ; then
  332.       echo "Instance running via launchd with PID $LAUNCHDPID, stopping it..."
  333.       launchctl stop org.neo4j.server
  334.       return
  335.     fi
  336.     # We fall through here since if there is no launchd install we stop manually started instance
  337.   fi
  338.  
  339.   if [ -z $NEO4J_PID ] ; then
  340.     echo "ERROR: server not running"
  341.     [ -e "$PID_FILE" ] && rm "$PID_FILE"
  342.   else
  343.     printf "Stopping neo4j-service [$NEO4J_PID]..."
  344.     x=0
  345.     while [ $x -lt $TIMEOUT ] && [ "$NEO4J_PID" != "" ]  ; do
  346.       kill $NEO4J_PID 2>/dev/null
  347.       printf "."
  348.       sleep 1
  349.       checkstatus
  350.       x=$[$x+1]
  351.     done
  352.       [  $x -eq $TIMEOUT ] && ( echo " force shutdown" ;  kill -9 $NEO4J_PID >/dev/null ) || echo " done"
  353.       [ -e "$PID_FILE" ] && rm  "$PID_FILE"
  354.   fi
  355. }
  356.  
  357. reportstatus() {
  358.  
  359.   checkstatus
  360.   detectos
  361.   exitonnojava
  362.  
  363.   if [ $DIST_OS = "macosx" ] ; then
  364.     getlaunchdpid
  365.     if [ $LAUNCHDPID -gt 0 ] ; then
  366.       echo "Instance running via launchd with PID $LAUNCHDPID"
  367.       exit 0
  368.     fi
  369.     # We fall through here since if there is no launchd install we may be still running via script
  370.   fi
  371.  
  372.   if [ -z $NEO4J_PID ] ; then
  373.     echo "Neo4j is not running"
  374.   else
  375.     echo "Neo4j is running at pid $NEO4J_PID"
  376.   fi
  377. }
  378.  
  379. console() {
  380.  
  381.   checkstatus
  382.  
  383.   if [ -z $NEO4J_PID ] ; then
  384.     echo "Starting neo4j-service console-mode..."
  385.  
  386.     exitonnojava
  387.     buildclasspath
  388.  
  389.      $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" -Dneo4j.home="${NEO4J_HOME}" -Dneo4j.instance="${NEO4J_INSTANCE}" org.neo4j.server.Bootstrapper
  390.  
  391.   else
  392.     echo "Server already running with pid $NEO4J_PID"
  393.     exit 1
  394.   fi
  395.  
  396. }
  397.  
  398. # Modifies neo4j config to set the effective user when running as a service
  399. # usage: modify_user_config <username> <created=false>
  400. # pass in "true" for created to mark that the user was created (instead than pre-existing)
  401. modify_user_config() {
  402.   created=${2:-"false"}
  403.   if `grep -q "wrapper\.user=" "${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"` ; then
  404.     sed -i -e "s/^.*wrapper\.user=.*$/wrapper\.user=$1/" "${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"
  405.   else
  406.     echo "wrapper.user=$1" >>"${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"
  407.   fi
  408.  
  409.   if `grep -q "wrapper\.user\.created=" "${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"` ; then
  410.     sed -i -e "s/^.*wrapper\.user\.created=.*$/wrapper\.user\.created=${created}/" "${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"
  411.   else
  412.     echo "wrapper.user.created=${created}" >> "${NEO4J_INSTANCE}/conf/neo4j-wrapper.conf"
  413.   fi
  414. }
  415.  
  416. # Creates a user on the system
  417. create_user() {
  418.   useradd -r $1
  419.   modify_user_config $1 "true"
  420.   echo "Created user \"${1}\"."
  421. }
  422.  
  423. remove_user() {
  424.   if [[ $wrapper_user_created == "true" ]]; then
  425.     read -p "It appears that user \"${wrapper_user}\" was created during install. Remove that user now? [yN] " yn
  426.     case $yn in
  427.       [Yy]* ) deluser $wrapper_user
  428.         ;;
  429.       * ) echo "OK, we'll let that user live, for now."
  430.         ;;
  431.     esac
  432.   else
  433.     echo "Neo4j was running as user \"${wrapper_user}\", which remains."
  434.   fi
  435. }
  436.  
  437. installservice() {
  438.     detectos
  439.     findjava
  440.     if [ ! -x "$JAVACMD" ] ; then
  441.       read -p "It was not possible to determine JAVA_HOME. Do you want to continue with the installation? [yN]" yn
  442.       case $yn in
  443.               [yY]* ) echo "WARNING: Alright, but Neo4j will fail to launch until Java has been properly installed and configured."
  444.               ;;
  445.       * ) echo "Aborting installation."
  446.           exit 1
  447.               ;;
  448.       esac
  449.     fi
  450.  
  451.     if [[ -d "/etc/init.d" ]]; then
  452.       if [[ -e "/etc/init.d/${SERVICE_NAME}" ]]; then
  453.         echo "${SERVICE_NAME} already installed."
  454.       else
  455.         if [ $UID != 0 ] ; then
  456.           eval echo  'Must be root to perform this action.'
  457.           exit 1
  458.         else
  459.           checkstatus
  460.           if [ ! -z $NEO4J_PID ] ; then
  461.             stopit
  462.           fi
  463.           if [[ $NEO4J_USER == $wrapper_user ]]; then
  464.             default_user=$wrapper_user
  465.           else
  466.             default_user="neo4j"
  467.           fi
  468.           read -p "Graph-like power should be handled carefully. What user should run Neo4j? [$default_user] " proposed_user
  469.           proposed_user=${proposed_user:-$default_user}
  470.           if ! `id $proposed_user &> /dev/null` ; then
  471.             read -p "User \"$proposed_user\" does not yet exist. Shall I create the account for you? [Yn]" yn
  472.             case $yn in
  473.               [Nn]* ) echo "WARNING: Alright, but Neo4j will fail to launch until that user has been created."
  474.               set_user $proposed_user
  475.               ;;
  476.             * ) create_user $proposed_user
  477.               ;;
  478.             esac
  479.           else
  480.             modify_user_config $proposed_user
  481.           fi
  482.           ln -s "${SCRIPT_NAME}" "/etc/init.d/${SERVICE_NAME}"
  483.           update-rc.d ${SERVICE_NAME} defaults
  484.           chown -R $proposed_user: "$NEO4J_HOME/data"
  485.         fi
  486.       fi
  487.     elif [[ $DIST_OS -eq "macosx" ]] ; then
  488.       sed -e "s^NEO4J_INSTANCE^'${NEO4J_INSTANCE}'^" <'${NEO4J_INSTANCE}/bin/org.neo4j.server.plist' >'${LAUNCHD_DIR}/org.neo4j.server.plist'
  489.       launchctl load -w ${LAUNCHD_DIR}/org.neo4j.server.plist
  490.       launchctl start org.neo4j.server
  491.     else
  492.       echo "Sorry, don't know how to install on ${DIST_OS}."
  493.     fi
  494.  
  495.     if [ -x "$JAVACMD" ] ; then
  496.       if [[ $DIST_OS -ne "macosx" ]] ; then
  497.         startit
  498.       fi
  499.     fi
  500. }
  501.  
  502. removeservice() {
  503.     checkstatus
  504.  
  505.     if [[ -d "/etc/init.d" ]]; then
  506.       if [[ -e "/etc/init.d/${SERVICE_NAME}" ]]; then
  507.         if [  $UID != 0 ] ; then
  508.           eval echo  'Must be root to perform this action.'
  509.           exit 1
  510.         else
  511.           if [ ! -z $NEO4J_PID ] ; then
  512.             stopit
  513.           fi
  514.       update-rc.d -f ${SERVICE_NAME} remove
  515.           rm /etc/init.d/${SERVICE_NAME}
  516.         fi
  517.         # remove effective user, if created by install-script
  518.         remove_user
  519.       else
  520.         echo "${SERVICE_NAME} not installed."
  521.       fi
  522.  
  523.     elif [[ $DIST_OS -eq "macosx" ]] ; then
  524.       if [[ -e ${LAUNCHD_DIR}/org.neo4j.server.plist ]]; then
  525.         launchctl unload -w ${LAUNCHD_DIR}/org.neo4j.server.plist
  526.         rm ${LAUNCHD_DIR}/org.neo4j.server.plist
  527.       fi
  528.     else
  529.       echo "Sorry, don't know how to install on ${DIST_OS}."
  530.     fi
  531.  
  532. }
  533.  
  534.  
  535. showinfo() {
  536.   reportstatus
  537.  
  538.   exitonnojava
  539.   buildclasspath
  540.  
  541.   echo "NEO4J_HOME:        $NEO4J_HOME"
  542.   echo "NEO4J_SERVER_PORT: $NEO4J_SERVER_PORT"
  543.   echo "NEO4J_INSTANCE:    $NEO4J_INSTANCE"
  544.   echo "JAVA_HOME:         $JAVA_HOME"
  545.   echo "JAVA_OPTS:         $JAVA_OPTS"
  546.   echo "CLASSPATH:         $CLASSPATH"
  547. }
  548.  
  549. case "$1" in
  550.   console)
  551.     console
  552.     ;;
  553.  
  554.   start)
  555.     startit
  556.     ;;
  557.  
  558.   stop)
  559.     stopit
  560.     ;;
  561.  
  562.   restart)
  563.     stopit
  564.     startit
  565.     ;;
  566.  
  567.   status)
  568.     reportstatus
  569.     ;;
  570.  
  571.   info)
  572.     showinfo
  573.     ;;
  574.   install)
  575.     installservice
  576.     ;;
  577.   remove)
  578.     removeservice
  579.     ;;
  580.   *)
  581.     echo "Usage: neo4j { start | stop | restart | status | info | install | remove }"
  582.     exit 1;;
  583.  
  584. esac
  585.  
  586. exit $?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement