Snorby worker daemon startup Script
lambis7 opened this issue · 1 comments
I want to start snorby worker deamon everytime my Raspberry Pi starts. I want to do this via supervisord. So i created /etc/supervisor/conf.d/snorby.conf file and i entered the above:
[program:snorby]
command=/usr/bin/ruby script/delayed_job start
directory=/var/www/html/snorby
stdout_logfile=/var/log/snorby.log
stderr_logfile=/var/log/snorby.err
autostart=true
autorestart=true
Then i update the supervisor. OK
But when i ckeck with sudo supervisorctl status i get a FATAL error that the worker is not working.
I assume that the problem may be with the command
/usr/bin/ruby script/delayed_job start
That command i found it on https://www.snort.org/documents/snort-2-9-8-x-on-ubuntu-12-lts-and-14-lts-and-15 guide, but on the guide the command is for Upstart, which is not available on Raspbian.
On guide says to create the /etc/init/snorby_worker.conf with the following content:
description "Snorby Delayed Job"
stop on runlevel [!2345]
start on runlevel [2345]
chdir /var/www/html/snorby
script
exec /usr/bin/ruby script/delayed_job start
end script
Any ideas how can i overcome this?
FIXED THAT
As i assumed the error was with command, specifically with path.
The correct path is:
/usr/local/bin/ruby script/delayed_job start