Sha256: 89a95d2d52798b6f8c464be2d43993a18a21290fc7fa8948d964b1e6125a31a7

Contents?: true

Size: 862 Bytes

Versions: 3

Compression:

Stored size: 862 Bytes

Contents

#!/bin/sh
#
### BEGIN INIT INFO
# Provides: <%= @service_name %>
# Required-Start:
# Required-Stop:
# 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 %>

[ -r <%= node['bluepill']['defaults_dir'] %>/$SERVICE_NAME ] && . <%= node['bluepill']['defaults_dir'] %>/$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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
from-scratch-0.7.0 cookbooks/bluepill/templates/default/bluepill_init.lsb.erb
from-scratch-0.6.0 cookbooks/bluepill/templates/default/bluepill_init.lsb.erb
from-scratch-0.5.0 cookbooks/bluepill/templates/default/bluepill_init.lsb.erb