<commit_before>#!/bin/bash -ex
# Expects to find DOMSERVER_S3_BUCKET, DOMSERVER_S3_REGION, DOMSERVER_S3_FILE in the env variables

INSTALLDIR="/srv/${DOMSERVER_S3_FILE%%.*}"
mkdir -p $INSTALLDIR

aws s3 cp --region=${DOMSERVER_S3_REGION} s3://${DOMSERVER_S3_BUCKET}/${DOMSERVER_S3_FILE} /tmp/${DOMSERVER_S3_FILE}
tar zxf /tmp/${DOMSERVER_S3_FILE} -C "$INSTALLDIR"

# run script to install/post configuration
cd $INSTALLDIR
chmod +x $INSTALLDIR/setup.sh
./setup.sh

# now we configure apache2, and reload it
cp $INSTALLDIR/apache2.conf /etc/apache2/sites-enabled/domserver.conf
service apache2 graceful<commit_msg>Don't preseve owner when extracting tar file<commit_after>#!/bin/bash -ex
# Expects to find DOMSERVER_S3_BUCKET, DOMSERVER_S3_REGION, DOMSERVER_S3_FILE in the env variables

INSTALLDIR="/srv/${DOMSERVER_S3_FILE%%.*}"
mkdir -p $INSTALLDIR

aws s3 cp --region=${DOMSERVER_S3_REGION} s3://${DOMSERVER_S3_BUCKET}/${DOMSERVER_S3_FILE} /tmp/${DOMSERVER_S3_FILE}
tar zxf --no-same-owner -/tmp/${DOMSERVER_S3_FILE} -C "$INSTALLDIR"

# run script to install/post configuration
cd $INSTALLDIR
chmod +x $INSTALLDIR/setup.sh
./setup.sh

# now we configure apache2, and reload it
cp $INSTALLDIR/apache2.conf /etc/apache2/sites-enabled/domserver.conf
service apache2 graceful
{'fraction_non_alphanumeric': 0.12401883830455258, 'fraction_numerical': 0.023547880690737835, 'mean_word_length': 5.746031746031746, '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': '87241', 'n_tokens_mistral': 519, 'n_tokens_neox': 466, 'n_words': 108}