<commit_before>### BEGIN INIT INFO
# Provides:          rfid listener
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

#! /bin/bash
# /etc/init.d/rfid

INPUT=/dev/input/event2
OUTPUT=/var/www/mtb/checkpoint0.txt
RFID_PATH=/home/mtb/24hMTB_rfid
PID=0

### main logic ###
case "$1" in
  start)
        echo -n "Starting RFID listener: "
        chmod 777 $INPUT
        chmod 777 $OUTPUT
        cd $RFID_PATH && sudo -u mtb ruby rfid.rb $INPUT $OUTPUT &
        PID=$!
        echo $PID
        ;;
  stop)
        echo -n "Stopping RFID listener: "
        kill -TERM $(cat $RFID_PATH/rfid.pid)
        ;;
  restart|reload|condrestart)
        stop
        start
        ;;
  *)<commit_msg>Update config<commit_after>### BEGIN INIT INFO
# Provides:          rfid listener
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

#! /bin/bash
# /etc/init.d/rfid

INPUT=/dev/input/event2
OUTPUT=/home/mtb/checkpoint/checkpoint.csv
RFID_PATH=/home/mtb/24hMTB_rfid
PID=0

### main logic ###
case "$1" in
  start)
        echo -n "Starting RFID listener: "
        chmod 777 $INPUT
        chmod 777 $OUTPUT
        cd $RFID_PATH && sudo -u mtb ruby rfid.rb $INPUT $OUTPUT &
        PID=$!
        echo $PID
        ;;
  stop)
        echo -n "Stopping RFID listener: "
        kill -TERM $(cat $RFID_PATH/rfid.pid)
        ;;
  restart|reload|condrestart)
        stop
        start
        ;;
  *)
{'fraction_non_alphanumeric': 0.11980033277870217, 'fraction_numerical': 0.020521353300055462, 'mean_word_length': 2.209964412811388, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '3656833', 'n_tokens_mistral': 672, 'n_tokens_neox': 623, 'n_words': 171}