<commit_before>#!/bin/sh
MY_PATH="`dirname \"$0\"`"              # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
if [ -z "$MY_PATH" ] ; then
  # error; for some reason, the path is not accessible
  # to the script (e.g. permissions re-evaled after suid)
  exit 1  # fail
fi

PROJDIR=$MY_PATH/../sources
PIDFILE="$PROJDIR/mysite.pid"
SOCKET="$PROJDIR/mysite.sock"
VENV="$PROJDIR/env/bin/activate"

start() {
        if [ -f $PIDFILE ]; then
            echo "Already running"
            exit 1
        fi

        echo "Activating virtual env $VENV"
        source $VENV

        echo "Starting Vaultier"
        eval $PROJDIR/manage.py runfcgi \
        maxchildren=10 \
        maxspare=5 \
        minspare=2 \
        method=prefork \
        socket=$SOCKET
        pidfile=$PIDFILE
        echo
}

stop() {
        echo "Stopping Vaultier"
        cd $PROJDIR
        if [ -f $PIDFILE ]; then
            kill `cat -- $PIDFILE`
            rm -f -- $PIDFILE
        fi
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status FOO
        ;;
  restart|reload|condrestart)
        stop
        start<commit_msg>deployment<commit_after>#!/bin/sh
MY_PATH="`dirname \"$0\"`"              # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
if [ -z "$MY_PATH" ] ; then
  # error; for some reason, the path is not accessible
  # to the script (e.g. permissions re-evaled after suid)
  exit 1  # fail
fi

PROJDIR=$MY_PATH/../sources
PIDFILE="$PROJDIR/mysite.pid"
SOCKET="$PROJDIR/mysite.sock"
VENV="$PROJDIR/env/bin/activate"

start() {
        if [ -f $PIDFILE ]; then
            echo "Already running"
            exit 1
        fi

        echo "Activating virtual: env $VENV"
        source $VENV

        echo "Starting Vaultier"
        eval $PROJDIR/manage.py runfcgi \
        maxchildren=10 \
        maxspare=5 \
        minspare=2 \
        method=prefork \
        socket=$SOCKET
        pidfile=$PIDFILE
        echo "started."
}

stop() {
        echo "Stopping Vaultier"
        cd $PROJDIR
        if [ -f $PIDFILE ]; then
            kill `cat -- $PIDFILE`
            rm -f -- $PIDFILE
        fi
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status FOO
        ;;
  restart|reload|condrestart)
        stop
        start
{'fraction_non_alphanumeric': 0.12161599333610995, 'fraction_numerical': 0.006663890045814244, 'mean_word_length': 1.6837988826815642, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3658224', 'n_tokens_mistral': 833, 'n_tokens_neox': 801, 'n_words': 202}