I am working on beanstalkd on Ubuntu (Very new for me), I want to know which is good way to start beanstalkd service on ubuntu boot.
In short, I would like to execute,
beanstalkd -b /path/to/binlog/directory -l 127.0.0.1 -p 11300
Using /etc/default/beanstalkd . I have added following code and reboot system (Not working)
BEANSTALKD_LISTEN_ADDR=127.0.0.1
BEANSTALKD_LISTEN_PORT=11300
BEANSTALKD_BINLOG_DIR=/var/www
DAEMON_OPTS="-l $BEANSTALKD_LISTEN_ADDR -p $BEANSTALKD_LISTEN_PORT -b $BEANSTALKD_BINGLOG_DIR"
START=yes
sudo nano /etc/init/beanstalkd.conf and pasting and reboot system (Not working)
description "simple, fast work queue"
start on filesystem stop on runlevel [!2345]
respawn respawn limit 5 2
exec su nobody -c 'exec /usr/local/bin/beanstalkd'
By editing rc.local file under /etc/ folder. Paste my command to execute before exit 0 (Working fine for me)
There is a sample Upstart script in the Beanstalkd repo at https://github.com/kr/beanstalkd/tree/master/adm/upstart which differs to your own only by the start/stop and respawn lines being seperated.
The configuration of the Binlog directory, and IP address can be added to the beanstalkd.conf file easily enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With