<commit_before>#!/bin/bash

echo "CppComet"

PATH=/sbin:/usr/sbin:/bin:/usr/bin
RUNDIR=/usr/bin
EXTRAOPTS=
PIDFILE=/var/run/cppcomet.pid


cd ${RUNDIR}

case "$1" in
    start) 
        if test -f "$PIDFILE"
        then
            echo "CppComet already run"
        else
            echo "Starting CppComet"
            /usr/bin/cppcomet --conf /etc/comet-server/comet.ini > /var/log/cpp_comet.log 2>/var/log/cpp_comet.log &
        fi
        ;;
    stop)
        if test -f "$PIDFILE"
        then
            echo "Stopping CppComet"
            kill `cat $PIDFILE`
            `rm -rf $PIDFILE`
        else
            echo "pid file does not exist" 
	        echo 'exit' > /tmp/cpp.comet
        fi
        ;;
    *)
        if test -f "$PIDFILE"
        then
            echo "Stopping CppComet"
            kill `cat $PIDFILE`
            `rm -rf $PIDFILE`
        else
            echo "pid file does not exist" 
        fi
        echo "Starting CppComet"
        /usr/bin/cppcomet > /var/log/cpp_comet.log 2>/var/log/cpp_comet.log &
        ;;
esac

<commit_msg>update for more stable work stop command<commit_after>#!/bin/bash

echo "CppComet"

PATH=/sbin:/usr/sbin:/bin:/usr/bin
RUNDIR=/usr/bin
EXTRAOPTS=
PIDFILE=/var/run/cppcomet.pid


cd ${RUNDIR}

case "$1" in
    start)  
        if test -f "$PIDFILE"
        then
            echo "CppComet already run"
        else
            echo "Starting CppComet"
            /usr/bin/cppcomet --conf /etc/comet-server/comet.ini > /var/log/cpp_comet.log 2>/var/log/cpp_comet.log &
        fi
        ;;
    stop)
        if test -f "$PIDFILE"
        then
            echo "Stopping CppComet"
            killall cppcomet
            kill `cat $PIDFILE`
            `rm -rf $PIDFILE`
        else
            echo "Stopping CppComet"
            killall cppcomet
            #echo "pid file does not exist" 
	        #echo 'exit' > /tmp/cpp.comet
        fi
        ;;
       *)
        if test -f "$PIDFILE"
        then
            echo "Stopping CppComet"
            killall -9 cppcomet
            kill `cat $PIDFILE`
            `rm -rf $PIDFILE`
        else
            echo "pid file does not exist" 
        fi
        echo "Starting CppComet"
	sleep 15
        /usr/bin/cppcomet --conf /etc/comet-server/comet.ini > /var/log/cpp_comet.log 2>/var/log/cpp_comet.log &
        ;;
esac
{'fraction_non_alphanumeric': 0.11125265392781317, 'fraction_numerical': 0.003821656050955414, 'mean_word_length': 1.4288659793814433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6838859', 'n_tokens_mistral': 856, 'n_tokens_neox': 802, 'n_words': 194}