Sha256: 149a03d851498d13d91ef8651344e3d9a17f597e99f28fdea8696b7c7809e66b

Contents?: true

Size: 1.02 KB

Versions: 9

Compression:

Stored size: 1.02 KB

Contents

#! /bin/sh
# monit: Monit
#
# chkconfig: - 86 14
# description: monit
# processname: monit
#
# Author: Gabriel Handford http://ducktyper.com

# Source function library
. /etc/rc.d/init.d/functions

RETVAL=0

DESC="monit"
NAME=monit
DAEMON=/usr/local/bin/monit
CONFFILE=/etc/monitrc
LOGFILE=/var/log/monit.log
PIDFILE=/var/run/monit.pid

start() {
  daemon $DAEMON -l $LOGFILE -p $PIDFILE -c $CONFFILE
  RETVAL=$?
  echo
  return $RETVAL;  
}

stop() {
  kill -QUIT `cat $PIDFILE` || echo -n " not running"
}

reload() {
  kill -HUP `cat $PIDFILE` || echo -n " can't reload"
}

case "$1" in
  start)
  	#echo -n "Starting $DESC: $NAME"
  	start
    RETVAL=$?;
	;;
  stop)
  	echo "Stopping $DESC: $NAME"
  	stop
  	RETVAL=$?;
	;;
  reload)
  	echo -n "Reloading $DESC configuration..."
  	reload
  	RETVAL=$?;
  	echo "reloaded."
  ;;
  restart)
  	echo -n "Restarting $DESC: $NAME"
  	stop
  	# Sleep after stop
  	sleep 1
  	start
  	RETVAL=$?;
	;;
  *)
	  echo "Usage: $0 {start|stop|restart|force-reload}" >&2
	  RETVAL=3;
	;;
esac

exit $RETVAL;

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
capigen-0.1.4 lib/templates/monit/monit.initd.centos.erb
capigen-0.1.1 templates/monit/monit.initd.centos.erb
capigen-0.1.2 lib/templates/monit/monit.initd.centos.erb
capigen-0.1.3 lib/templates/monit/monit.initd.centos.erb
capitate-0.1.7 lib/templates/monit/monit.initd.centos.erb
capitate-0.2.2 lib/templates/monit/monit.initd.centos.erb
capitate-0.1.8 lib/templates/monit/monit.initd.centos.erb
capitate-0.1.9 lib/templates/monit/monit.initd.centos.erb
capitate-0.2.1 lib/templates/monit/monit.initd.centos.erb