title: OrientDB as a daemon on Ubuntu not stopping
body: <p>Followed the documentation for Installing orientdb on Linux/Ubuntu on the following location, <a href="http://orientdb.com/docs/2.1/Unix-Service.html" rel="nofollow">http://orientdb.com/docs/2.1/Unix-Service.html</a></p>
  
  <p>Set the following variables : JAVA_HOME, JRE_HOME, ORIENTDB_HOME and the following changes in the below files,</p>
  
  <p><strong>orientdb.sh</strong></p>
  
  <pre><code>#!/bin/sh
  # OrientDB service script
  #
  # Copyright (c) Orient Technologies LTD (http://www.orientechnologies.com)
  
  # chkconfig: 2345 20 80
  # description: OrientDb init script
  # processname: orientdb.sh
  
  # You have to SET the OrientDB installation directory here
  ORIENTDB_DIR="/local/some-location"
  ORIENTDB_USER="some-user"
  </code></pre>
  
  <p><strong>Installing for systemmd</strong>
  /etc/systemd/system/orientdb.service</p>
  
  <pre><code>[Unit]
  Description=OrientDB Server
  After=network.target
  After=syslog.target
  
  [Install]
  WantedBy=multi-user.target
  
  [Service]
  Type=forking
  ExecStart=/local/some-location/bin/orientdb.sh start
  ExecStop=/local/some-location/bin/orientdb.sh stop
  ExecStatus=/local/some-location/bin/orientdb.sh status
  </code></pre>
  
  <p>It is possible to start the service by the following command</p>
  
  <pre><code>systemctl start orientdb.service
  </code></pre>
  
  <p>But the service will not stop after giving the following command</p>
  
  <pre><code>systemctl stop orientdb.service
  </code></pre>
  
  <p>Machine Info :</p>
  
  <ul>
  <li>Java 8.0_31 </li>
  <li>Orientdb 2.1.12 </li>
  <li>Ubuntu 15.04 on Virtual Box VM</li>
  </ul>