<commit_before>#!/bin/bash

BASE_DIR="/mnt/storage0/koding2"
APP_DIR="${BASE_DIR}/kites/"
LOG_FILE="/var/log/node/kiteCake.log"
PID_FILE="/var/run/node/kiteCake.pid"
OPTIONS="-c config-prod run"
CAKE="/usr/bin/cake"

CMD="${CAKE} ${OPTIONS}"
cd ${APP_DIR}
if [ "$1" == "start" ]; then
    if  ! ${CMD} >> ${LOG_FILE} 2>&1  ; then
        echo "Can't start ${CMD}" >> ${LOG_FILE}
        exit 1
    fi

elif [ "$1" = "stop" ]; then
    if  kill $(cat ${PID_FILE}) 2>> ${LOG_FILE} ; then
        echo "${CMD} killed with 15" >> ${LOG_FILE}
        rm ${PID_FILE}
    else
        echo "Can't kill ${CMD} with pid file ${PID_FILE}"
    fi
else
    echo "Usage: $0 start/stop"
fi
<commit_msg>fix cl0 monit script<commit_after>#!/bin/bash

BASE_DIR="/mnt/storage0/koding2"
APP_DIR="${BASE_DIR}/kites/"
LOG_FILE="/var/log/node/kiteCake.log"
PID_FILE="/var/run/node/kiteCake.pid"
#OPTIONS="-c config-prod run"
OPTIONS="cl0"
CAKE="/usr/bin/cake"

CMD="${CAKE} ${OPTIONS}"
cd ${APP_DIR}
if [ "$1" == "start" ]; then
    if  ! ${CMD} >> ${LOG_FILE} 2>&1  ; then
        echo "Can't start ${CMD}" >> ${LOG_FILE}
        exit 1
    fi

elif [ "$1" = "stop" ]; then
    if  kill $(cat ${PID_FILE}) 2>> ${LOG_FILE} ; then
        echo "${CMD} killed with 15" >> ${LOG_FILE}
        rm ${PID_FILE}
    else
        echo "Can't kill ${CMD} with pid file ${PID_FILE}"
    fi
else
    echo "Usage: $0 start/stop"
fi

{'fraction_non_alphanumeric': 0.20457796852646637, 'fraction_numerical': 0.017167381974248927, 'mean_word_length': 3.055072463768116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '981997', 'n_tokens_mistral': 580, 'n_tokens_neox': 551, 'n_words': 134}