<commit_before>#! /bin/sh
#
<% case @platform_family %>
<% when 'rhel' %>
# monit         Monitor Unix systems
#
# chkconfig:    2345 98 02
# description:  Monit is a utility for managing and monitoring processes,
#               files, directories and filesystems on a Unix system. 
# processname:  monit
# pidfile:      /var/run/monit.pid
# config:       <% @conf_file %>
<% when 'debian' %>
### BEGIN INIT INFO
## Provides:		monit
## Default-Start:	2 3 4 5
## Default-Stop:		
## Short-Description:	Monitor Unix systems
#### END INIT INFO
<% end %>

MONIT=<%= @binary %>
CONFIG=<%= @conf_file %>
PID=/var/run/monit.pid

[ -f $MONIT ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start)
        echo -n "Starting monit: "
        $MONIT -c $CONFIG -p $PID
        RETVAL=$?
        echo
        ;;
  stop)
        echo -n "Stopping monit: "
        $MONIT -c $CONFIG -p $PID quit
        RETVAL=$?
        echo
        ;;
  restart)
  	$0 stop
	$0 start
	RETVAL=$?
	;;
  status)
        $MONIT -c $CONFIG -p $PID status
        RETVAL=$?
        ;;
  reload)
        echo -n "Reloading monit: "
        $MONIT -c $CONFIG -p $PID reload
        RETVAL=$?
        echo
        ;;
  *)
	echo "Usage: $0 {start|stop|restart|condrestart|status}"
	exit 1
esac

exit $RETVAL
<commit_msg>verify binary is executable<commit_after>#! /bin/sh
#
<% case @platform_family %>
<% when 'rhel' %>
# monit         Monitor Unix systems
#
# chkconfig:    2345 98 02
# description:  Monit is a utility for managing and monitoring processes,
#               files, directories and filesystems on a Unix system. 
# processname:  monit
# pidfile:      /var/run/monit.pid
# config:       <% @conf_file %>
<% when 'debian' %>
### BEGIN INIT INFO
## Provides:		monit
## Default-Start:	2 3 4 5
## Default-Stop:		
## Short-Description:	Monitor Unix systems
#### END INIT INFO
<% end %>

MONIT=<%= @binary %>
CONFIG=<%= @conf_file %>
PID=/var/run/monit.pid

[ -x $MONIT ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start)
        echo -n "Starting monit: "
        $MONIT -c $CONFIG -p $PID
        RETVAL=$?
        echo
        ;;
  stop)
        echo -n "Stopping monit: "
        $MONIT -c $CONFIG -p $PID quit
        RETVAL=$?
        echo
        ;;
  restart)
  	$0 stop
	$0 start
	RETVAL=$?
	;;
  status)
        $MONIT -c $CONFIG -p $PID status
        RETVAL=$?
        ;;
  reload)
        echo -n "Reloading monit: "
        $MONIT -c $CONFIG -p $PID reload
        RETVAL=$?
        echo
        ;;
  *)
	echo "Usage: $0 {start|stop|restart|condrestart|status}"
	exit 1
esac

exit $RETVAL

{'fraction_non_alphanumeric': 0.1409961685823755, 'fraction_numerical': 0.014559386973180077, 'mean_word_length': 2.123205741626794, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '225075', 'n_tokens_mistral': 1011, 'n_tokens_neox': 921, 'n_words': 279}