Configure OrientDB as a Service

Scripts in the /etc/init.d directory may be used to run processes as services.

The commands for starting, stopping, and restarting the OrientDB Server are:

> sudo service orientdb start


> sudo service orientdb stop


> sudo service orientdb restart

The script for /etc/init.d/orientdb is:

export ORIENTDB_HOME=/opt/orientdb

case "$1" in
  start)
    echo "Starting OrientDB Server"
    cd /opt/orientdb/bin
    nohup sudo -u orientdb ./server.sh > /var/log/orientdb.log 2>&1&
    echo "OrientDB Server was started"
    ;;
  stop)
    echo "Stopping OrientDB Server"
    /opt/orientdb/bin/shutdown.sh
    echo "OrientDB Server was stopped"
    ;;
  restart)
    # Re-run this script with stop and start arguments.
    $0 stop
    sleep 5
    $0 start
    ;;
  *)
    echo "Usage orientdb {start|stop|restart}"
    ;;
esac

exit 0

30.04.2014 14:21

Комментарии

Комментариев пока нет.


Copyrights © 2007 - 2026 YaPro.Ru