<commit_before>#!/bin/sh
# OpenNIC MUD4TLD operations script.
# By <NAME> (C) 2012. <EMAIL>.
# Can be freely used by the OpenNIC community.
# To install change the following to appropriate settings for your TLD and configuration,
# especially the OpenNIC suite, and run. A cron job could be handy too.

# change these to suit. they should be self-explanatory.
TLD_DB=/var/www/opennic.oz/OZ_tld.sq3
ZONE_DIR=/etc/bind/zones/
OPENNIC_SUITE=/home/USER/opennic_tools/
PRIMARY_IP=192.168.3.11
SECONDARY_IP=192.168.127.12
MY_EMAIL=hostmaster.opennic.oz
MY_HOST=ns1.opennic.oz
MY_TLD=oz
# end of modifications

# TODO: detect flag file indicating a change

# get to the directory
cd $OPENNIC_SUITE

echo -n "Copying TLD database..."
cp $TLD_DB $OPENNIC_SUITE
echo "Done"

echo -n "Generating TLD zone file..."
cd $OPENNIC_SUITE
./init_tld $MY_TLD $MY_HOST $MY_EMAIL $PRIMARY_IP $SECONDARY_IP > $MY_TLD.zone
echo "Done"

echo -n "Installing new zone file..."
cp $MY_TLD.zone $ZONE_DIR
echo "Done"

echo -n "Restarting BIND..."
/etc/init.d/bind reload
echo "Done"

# TODO: remove flag file so we know we're done.<commit_msg>new make_live.sh script<commit_after>#!/bin/sh
# OpenNIC MUD4TLD operations script.
# By <NAME> (C) 2012. <EMAIL>.
# Can be freely used by the OpenNIC community.
# To install change the following to appropriate settings for your TLD and configuration,
# especially the OpenNIC suite, and run. A cron job could be handy too.

# change these to suit. they should be self-explanatory.
TLD_DB=/var/www/opennic.oz/OZ_tld.sq3
ZONE_DIR=/etc/bind/zones/
OPENNIC_SUITE=/home/USER/opennic_tools/
PRIMARY_IP=192.168.3.11
SECONDARY_IP=192.168.127.12
MY_EMAIL=hostmaster.opennic.oz
MY_HOST=ns1.opennic.oz
MY_TLD=oz
# end of modifications

# detect if flag file exists indicating a change
if [ ! -f /tmp/inittld.flag ]; then
exit 0
fi

# get to the directory
cd $OPENNIC_SUITE

echo -n "Copying TLD database..."
cp $TLD_DB $OPENNIC_SUITE
echo "Done"

echo -n "Generating TLD zone file..."
cd $OPENNIC_SUITE
./init_tld $MY_TLD $MY_HOST $MY_EMAIL $PRIMARY_IP $SECONDARY_IP > $MY_TLD.zone
echo "Done"

echo -n "Installing new zone file..."
cp $MY_TLD.zone $ZONE_DIR
echo "Done"

echo -n "Restarting BIND..."
/etc/init.d/bind reload
echo "Done"

# remove flag file
rm /tmp/inittld.flag

exit 0
{'fraction_non_alphanumeric': 0.11091703056768559, 'fraction_numerical': 0.02445414847161572, 'mean_word_length': 4.230593607305936, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 4, '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': '5591728', 'n_tokens_mistral': 935, 'n_tokens_neox': 887, 'n_words': 269}