Hello, sorry for the delay :(
You could do something like this:
vim /lib/systemd/system/omnidb-server.service
Fill it with:
[Unit]
Description=OmniDB: executes omnidb-server.
[Service]
Type=forking
ExecStart=/bin/bash -c "omnidb-server &"
RemainAfterExit=yes
User=root
Group=root
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=omnidb-server
[Install]
WantedBy=multi-user.target
You must change User and Group to the user and group where omnidb-server is installed. In my case, it's root and root.
Type=forking
will make it possible to use systemctl start and stop statements.
ln -s /lib/systemd/system/omnidb-server.service /etc/systemd/system/omnidb-server.service
systemctl daemon-reload
And, to add output to rsyslog and save it to file /var/log/omnidb-server.log
:
vim /etc/rsyslog.d/omnidb-server.conf
Content:
if $programname == 'omnidb-server' then /var/log/omnidb-server.log
if $programname == 'omnidb-server' then ~
systemctl restart rsyslog
systemctl start omnidb-server