<commit_before>#!/bin/bash
export PATH=/usr/local/bin:/usr/bin:/bin/:/usr/lib/dart/bin
export HOME=/root
DIRROOT=/dartdoc-generator

case $1 in
   start)
      echo $$ > /var/run/package_generator.pid;
      mkdir -p $DIRROOT/logs
      exec 2>&1 dart $DIRROOT/bin/package_generator.dart --dirroot $DIRROOT 1>$DIRROOT/logs/log.txt
      ;;
    stop)
      kill `cat /var/run/package_generator.pid` ;;
    *)
      echo "usage: monit.sh {start|stop}" ;;
esac
exit 0<commit_msg>Avoid destroying the log file on process restart<commit_after>#!/bin/bash
export PATH=/usr/local/bin:/usr/bin:/bin/:/usr/lib/dart/bin
export HOME=/root
DIRROOT=/dartdoc-generator

case $1 in
   start)
      echo $$ > /var/run/package_generator.pid;
      mkdir -p $DIRROOT/logs
      exec 2>&1 dart $DIRROOT/bin/package_generator.dart --dirroot $DIRROOT 1>>$DIRROOT/logs/log.txt
      ;;
    stop)
      kill `cat /var/run/package_generator.pid` ;;
    *)
      echo "usage: monit.sh {start|stop}" ;;
esac
exit 0
{'fraction_non_alphanumeric': 0.1548582995951417, 'fraction_numerical': 0.010121457489878543, 'mean_word_length': 2.956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '7190307', 'n_tokens_mistral': 389, 'n_tokens_neox': 353, 'n_words': 72}