<commit_before>#!/bin/sh

ROOT_DIR=$(dirname $(cd $(dirname "$0"); pwd););

cd $ROOT_DIR

bin/start-solr.sh &> data/log/solr-server.log &
bin/start-www.sh &> data/log/www-server.log &
bin/start-crawler.sh<commit_msg>Rewritten start-all shell script to start java processes directly.<commit_after>#!/bin/bash

ROOT_DIR=$(dirname $(cd $(dirname "$0"); pwd););

LIB_DIR="$ROOT_DIR/lib";
CONFIG_DIR="$ROOT_DIR/config";
DATA_DIR="$ROOT_DIR/data";
MODULES_DIR="$ROOT_DIR/modules";

# Solr:

java \
  -jar "$LIB_DIR/jetty/start.jar"\
  -Dsolr.solr.home="$ROOT_DIR/search"\
  -Dsolr.data.dir="$DATA_DIR/solr"\
  "$CONFIG_DIR/config/jetty-solr.xml" &> "$DATA_DIR/log/solr-server.log" &

# save pid of java process:
echo $! > "$DATA_DIR/solr.pid"

sleep 2


# Www:

java \
    -Dringo.classpath="./**"\
    -jar "$LIB_DIR/run.jar"\
    -D ringo.home="$LIB_DIR/ringo.jar"\
    -e "require.paths.push('$CONFIG_DIR')"\
    "$MODULES_DIR/start-www.js" &> "$DATA_DIR/log/www-server.log" &

# save pid of java process:
echo $! > "$DATA_DIR/www.pid"


# Crawler:

java \
    -Dringo.classpath="./**"\
    -jar "$LIB_DIR/run.jar"\
    -D ringo.home="$LIB_DIR/ringo.jar"\
    -e "require.paths.push('$CONFIG_DIR')"\
    -i "$MODULES_DIR/start-crawler.js" 

{'fraction_non_alphanumeric': 0.21422797089733225, 'fraction_numerical': 0.002425222312045271, 'mean_word_length': 3.654135338345865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 5, 'xml': 1}, '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': '3550194', 'n_tokens_mistral': 527, 'n_tokens_neox': 520, 'n_words': 76}