Initial Chef repository
This commit is contained in:
34
cookbooks/bluepill/templates/default/bluepill_init.lsb.erb
Normal file
34
cookbooks/bluepill/templates/default/bluepill_init.lsb.erb
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: <%= @service_name %>
|
||||
# Required-Start: bar
|
||||
# Defalt-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Description: Bluepill loader for <%= @service_name %>
|
||||
### END INIT INFO
|
||||
|
||||
BLUEPILL_BIN=<%= node['bluepill']['bin'] %>
|
||||
BLUEPILL_CONFIG=<%= @config_file %>
|
||||
SERVICE_NAME=<%= @service_name %>
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Loading bluepill configuration for $SERVICE_NAME "
|
||||
$BLUEPILL_BIN load $BLUEPILL_CONFIG
|
||||
;;
|
||||
stop)
|
||||
$BLUEPILL_BIN $SERVICE_NAME stop
|
||||
$BLUEPILL_BIN $SERVICE_NAME quit
|
||||
;;
|
||||
restart)
|
||||
$BLUEPILL_BIN $SERVICE_NAME restart
|
||||
;;
|
||||
status)
|
||||
$BLUEPILL_BIN $SERVICE_NAME status
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user