Followed the documentation for Installing orientdb on Linux/Ubuntu on the following location, http://orientdb.com/docs/2.1/Unix-Service.html
Set the following variables : JAVA_HOME, JRE_HOME, ORIENTDB_HOME and the following changes in the below files,
orientdb.sh
#!/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"
Installing for systemmd /etc/systemd/system/orientdb.service
[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
It is possible to start the service by the following command
systemctl start orientdb.service
But the service will not stop after giving the following command
systemctl stop orientdb.service
Machine Info :
modify your service file according to this:
$ cat /etc/systemd/system/orientdb.service
[Unit]
Description=OrientDB Server
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
User=<USER>
Group=<GROUP>
ExecStart=<ORIENTDB_INSTALL_PATH>/bin/server.sh
SuccessExitStatus=143
modifying with your user,group and path.
than reload the service systemctl daemon-reload
Using this is working for me on Fedora23.
Let me know.
Ivan
EDIT
Tried on Ubuntu 15.04 and it works.