<commit_before>#!/bin/bash
### BEGIN INIT INFO
# Provides:          harvester daemon
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Start/stop pi-b-q harvester daemon
### END INIT INFO

#PATH=/sbin:/usr/sbin:/bin:/usr/bin

HARVESTER="/var/www/pi-b-q/bin/harvester_control"
APP_DIR="/var/www/pi-b-q"
RAILS_ENV=production
APP_NAME="pi-b-q harvester"
USER="pi"
ENV_FILE=/etc/default/harvester

# Source the env file if it exists
[ -f "$ENV_FILE" ] && . $ENV_FILE

. /lib/lsb/init-functions
. /usr/local/rvm/scripts/rvm

rvm use 2.2.1

case "$1" in
  start)
    echo "Starting $APP_NAME"
    echo "su - $USER -c \"$HARVESTER\" start"
    cd $APP_DIR
    su - $USER -c "$HARVESTER" start
    ;;
  stop)
    echo "Stopping $APP_NAME"
    cd $APP_DIR
    $HARVESTER stop
    ;;
  restart)
    echo "Restarting $APP_NAME"
    cd $APP_DIR
    $HARVESTER restart
    ;;
  *)
    echo "Usage: $0 start|stop|restart" >&2
    exit 3
    ;;
esac<commit_msg>Fixed harvester<commit_after>#!/bin/bash
### BEGIN INIT INFO
# Provides:          harvester daemon
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Start/stop pi-b-q harvester daemon
### END INIT INFO

#PATH=/sbin:/usr/sbin:/bin:/usr/bin

HARVESTER="/var/www/pi-b-q/bin/harvester_control"
APP_DIR="/var/www/pi-b-q"
RAILS_ENV=production
APP_NAME="pi-b-q harvester"
USER="pi"
ENV_FILE=/etc/default/harvester

# Source the env file if it exists
[ -f "$ENV_FILE" ] && . $ENV_FILE

. /lib/lsb/init-functions
. /usr/local/rvm/scripts/rvm

rvm use 2.2.1

case "$1" in
  start)
    echo "Starting $APP_NAME"
    echo "su - $USER -c \"$HARVESTER\" start"
    cd $APP_DIR
    su - $USER -c "$HARVESTER start"
    ;;
  stop)
    echo "Stopping $APP_NAME"
    cd $APP_DIR
    $HARVESTER stop
    ;;
  restart)
    echo "Restarting $APP_NAME"
    cd $APP_DIR
    $HARVESTER restart
    ;;
  *)
    echo "Usage: $0 start|stop|restart" >&2
    exit 3
    ;;
esac
{'fraction_non_alphanumeric': 0.15, 'fraction_numerical': 0.014, 'mean_word_length': 2.747191011235955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '2945384', 'n_tokens_mistral': 858, 'n_tokens_neox': 810, 'n_words': 186}