- From: Geoff Meakin <
>
- To:
- Subject: [chef] Chef - no definition for LSB init scripts?
- Date: Mon, 5 Mar 2012 13:04:55 +0000
I note that in Debian squeeze, init has been moved over to LSB-style init
scripts.
Lots of chef modules set up services as follows (e.g. taken from chef-server:)
service "rabbitmq-server" do
if platform?("centos","redhat","fedora")
start_command "/sbin/service rabbitmq-server start &> /dev/null"
stop_command "/sbin/service rabbitmq-server stop &> /dev/null"
end
supports [ :restart, :status ]
action [ :enable, :start ]
end
However, there is no information there about what runlevels it should run in,
and consequently on reboot the service does not start. To fix I've had to
manually do this to the resultant /etc/init.d/rabbitmq-server:
### BEGIN INIT INFO
# Provides: rabbitmq-server
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: RabbitMQ broker
# Short-Description: Enable AMQP service provided by RabbitMQ broker
### END INIT INFO
Is there a chef way of setting this information as Debian has now chosen to
follow this new way of controlling boot-time dependency-based startup items.
Thanks in advance
Geoff
- [chef] Chef - no definition for LSB init scripts?, Geoff Meakin, 03/05/2012
Archive powered by MHonArc 2.6.16.