I'm trying to install OrientDB on my Raspberry 3, and configure it to run it as a service. I'm following the instruction found at here.
I downloaded the binaries, and unpacked them at /opt/orientdb/ directory. I have successfully started the OrientDB database using the server.sh, and I've logged into OrientDB Studio locally. The problem is only when trying to run it as a service.
I edited the orientdb.sh file as instructed
# You have to SET the OrientDB installation directory here
ORIENTDB_DIR="/opt/orientdb"
ORIENTDB_USER="pi"
LOG_DIR="../log"
And I copied it over to /etc/init.d. However, whenever I try to start the service, I get the error below:
pi@raspberrypi:~ $ sudo service orientdb start
Failed to start orientdb.service: Unit orientdb.service failed to load: No such file or directory.
I haven't being able to determine the reason behind this error.
* UPDATE *
Looking at this post, I executed the command sudo systemctl enable orientdb, and I got this error:
Synchronizing state for orientdb.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d orientdb defaults
insserv: warning: script 'orientdb' missing LSB tags and overrides
Executing /usr/sbin/update-rc.d orientdb enable
update-rc.d: error: orientdb Default-Start contains no runlevels, aborting.
After this, when I execute the sudo systemctl start orientdb, I no longer get the error, but also nothing happens. and nothing is generated in the log folder
* UPDATE *
I'm using Raspbian. Below is the result of the command systemctl cat orientdb.service.
pi@raspberrypi:/opt/orientdb $ systemctl cat orientdb.service
# /run/systemd/generator.late/orientdb.service
# Automatically generated by systemd-sysv-generator
[Unit]
SourcePath=/etc/init.d/orientdb
Description=SYSV: OrientDb init script
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutd
After=xrdp.service triggerhappy.service
Conflicts=shutdown.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SysVStartPriority=2
ExecStart=/etc/init.d/orientdb start
ExecStop=/etc/init.d/orientdb stop
Thanks