<commit_before>#!/usr/bin/env bash
# MIT License
# Copyright (c) 2017 <NAME>
# This installer was support only for Ubuntu (for now)

HOME_GETH=/home/geth
ETC_DIRECTORY=$HOME_GETH/go/src/github.com/ethereumproject
set -e

if [[ $EUID -ne 0 ]]; then
    echo "Please run this script with sudo:"
    echo "sudo $0 $*"
    exit 1
fi

echo "Hello, "$USER".  This script will install Ethereum Classic node."
echo -n "Enter the amount (in Megabytes) of disk that you'll allocate for Ethereum Classic (ex. 512) [ENTER]: "
read CACHE_SIZE

if [[ -n ${CACHE_SIZE//[0-9]/} ]]; then
    echo "It can't Contains letters!"
    exit 1
fi

if [ $CACHE_SIZE -lt 512 ]; then
  echo "Ethereum Classic Devs recommend minimum 512, this script sets 512 to allocate in disk."
  CACHE_SIZE = 512
fi

cat <<EOT >> /etc/systemd/system/ethereum-classic.service
[Unit]
Description=Geth Service

[Service]
Environment=
WorkingDirectory=/home/geth/
ExecStart=geth --fast --cache=$CACHE_SIZE
Restart=always

[Install]
WantedBy=multi-user.target
EOT

echo "Cleaning before instalation..."
echo "Removing geth user"
userdel geth || true  2> /dev/null
rm -rf $HOME_GETH || true  2> /dev/null

useradd -m -U geth
add-apt-repository -y ppa:longsleep/golang-backports
apt-get update
apt-get install -y git build-essential software-properties-common golang-go
runuser -l geth -c "mkdir -p $ETC_DIRECTORY && cd $ETC_DIRECTORY && git clone https://github.com/ethereumproject/go-ethereum.git"
runuser -l geth -c "cd $ETC_DIRECTORY/go-ethereum && go get -t -v ./... && go build ./cmd/geth && cp geth $HOME_GETH && cd $HOME_GETH && rm -rf go"
mv /home/geth/geth /usr/bin/

apt-get remove -y golang-go git

systemctl daemon-reload
systemctl enable ethereum-classic.service
systemctl start ethereum-classic.service<commit_msg>Modify systemd<commit_after>#!/usr/bin/env bash
# MIT License
# Copyright (c) 2017 <NAME>
# This installer was support only for Ubuntu (for now)

HOME_GETH=/home/geth
ETC_DIRECTORY=$HOME_GETH/go/src/github.com/ethereumproject
set -e

if [[ $EUID -ne 0 ]]; then
    echo "Please run this script with sudo:"
    echo "sudo $0 $*"
    exit 1
fi

echo "Hello, "$USER".  This script will install Ethereum Classic node."
echo -n "Enter the amount (in Megabytes) of disk that you'll allocate for Ethereum Classic (ex. 512) [ENTER]: "
read CACHE_SIZE

if [[ -n ${CACHE_SIZE//[0-9]/} ]]; then
    echo "It can't Contains letters!"
    exit 1
fi

if [ $CACHE_SIZE -lt 512 ]; then
  echo "Ethereum Classic Devs recommend minimum 512, this script sets 512 to allocate in disk."
  CACHE_SIZE = 512
fi

cat <<EOT >> /etc/systemd/system/ethereum-classic.service
[Unit]
Description=Geth Service

[Service]
WorkingDirectory=/home/geth/
ExecStart=/usr/bin/geth --fast --cache=$CACHE_SIZE
Restart=always

[Install]
WantedBy=multi-user.target
EOT

echo "Cleaning before instalation..."
echo "Removing geth user"
userdel geth || true  2> /dev/null
rm -rf $HOME_GETH || true  2> /dev/null

useradd -m -U geth
add-apt-repository -y ppa:longsleep/golang-backports
apt-get update
apt-get install -y git build-essential software-properties-common golang-go
runuser -l geth -c "mkdir -p $ETC_DIRECTORY && cd $ETC_DIRECTORY && git clone https://github.com/ethereumproject/go-ethereum.git"
runuser -l geth -c "cd $ETC_DIRECTORY/go-ethereum && go get -t -v ./... && go build ./cmd/geth && cp geth $HOME_GETH && cd $HOME_GETH && rm -rf go"
mv /home/geth/geth /usr/bin/

apt-get remove -y golang-go git

systemctl daemon-reload
systemctl enable ethereum-classic.service
systemctl start ethereum-classic.service
{'fraction_non_alphanumeric': 0.1253161000280978, 'fraction_numerical': 0.015172801348693454, 'mean_word_length': 3.8633879781420766, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '1949696', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1246, 'n_words': 407}