<commit_before># To install:
# 1) copy script
# 2) cd ~
# 3) vim script.sh
# 4) press i to enter insert mode
# 5) paste
# 6) press Esc, then enter :x then press Enter to save and exit vim
# 7) chmod +x script.sh
# 8) ./script.sh
# 9) monitor the output from the script, in case it throws an error
# *) do not include your own node in the addnode config, it will cause the Neural Network to ban your node
#=========================================================================================================

#!/bin/bash
echo "-=-=-=- The server will reboot when the script is complete -=-=-=-"
echo "-=-=-=- Ensuring root directory -=-=-=-"
cd

echo "-=-=-=- Adding Google DNS -=-=-=-"
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf

echo "-=-=-=- Adding hosts -=-=-=-"
echo "spideroak.com" >> /etc/hosts

echo "-=-=-=- Updating Debian -=-=-=-"
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:gridcoin/gridcoin-stable
sources="/etc/apt/sources.list.d/gridcoin-gridcoin-stable-jessie.list"
echo 'deb http://ppa.launchpad.net/gridcoin/gridcoin-stable/ubuntu trusty main' | sudo tee $sources
echo 'deb-src http://ppa.launchpad.net/gridcoin/gridcoin-stable/ubuntu trusty main' | sudo tee -a $sources
wget https://mirrors.kernel.org/ubuntu/pool/main/m/miniupnpc/libminiupnpc8_1.6-3ubuntu1.2_amd64.deb
sudo dpkg -i libminiupnpc8_1.6-3ubuntu1.2_amd64.deb
sudo apt-get -y update&&sudo apt-get -y upgrade
sudo apt-get -y install gridcoinresearchd
sudo apt-get -y install unzip ntp

echo "-=-=-=- Creating Swap -=-=-=-"
sudo su -c "dd if=/dev/zero of=/swapfile bs=1M count=2048 ; mkswap /swapfile ; swapon /swapfile"
echo '/swapfile swap swap defaults 0 0' | sudo tee -a /etc/fstab

echo "-=-=-=- Setting up NTP -=-=-=-"
/etc/init.d/ntp start

echo "-=-=-=- Create Gridcoin User -=-=-=-"
sudo useradd -m gridcoin

echo "-=-=-=- Creating config-=-=-=-"
cd /home/gridcoin
sudo -u gridcoin mkdir .GridcoinResearch
cd /home/gridcoin/.GridcoinResearch/
sudo -u gridcoin wget https://download.gridcoin.us/download/downloadstake/signed/snapshot.zip&&sudo unzip snapshot.zip&&sudo rm snapshot.zip
sudo chown -R gridcoin:gridcoin /home/gridcoin/.GridcoinResearch/*
config="/home/gridcoin/.GridcoinResearch/gridcoinresearch.conf"<commit_msg>Update GridcoinAutoNodeDebian.sh<commit_after># To install:
# 1) copy script
# 2) cd ~
# 3) vim script.sh
# 4) press i to enter insert mode
# 5) paste
# 6) press Esc, then enter :x then press Enter to save and exit vim
# 7) chmod +x script.sh
# 8) ./script.sh
# 9) monitor the output from the script, in case it throws an error
# *) do not include your own node in the addnode config, it will cause the Neural Network to ban your node
#=========================================================================================================

#!/bin/bash
echo "-=-=-=- The server will reboot when the script is complete -=-=-=-"
echo "-=-=-=- Ensuring root directory -=-=-=-"
cd

echo "-=-=-=- Adding Google DNS -=-=-=-"
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf

echo "-=-=-=- Updating Debian -=-=-=-"
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:gridcoin/gridcoin-stable
sources="/etc/apt/sources.list.d/gridcoin-gridcoin-stable-jessie.list"
echo 'deb http://ppa.launchpad.net/gridcoin/gridcoin-stable/ubuntu trusty main' | sudo tee $sources
echo 'deb-src http://ppa.launchpad.net/gridcoin/gridcoin-stable/ubuntu trusty main' | sudo tee -a $sources
wget https://mirrors.kernel.org/ubuntu/pool/main/m/miniupnpc/libminiupnpc8_1.6-3ubuntu1.2_amd64.deb
sudo dpkg -i libminiupnpc8_1.6-3ubuntu1.2_amd64.deb
sudo apt-get -y update&&sudo apt-get -y upgrade
sudo apt-get -y install gridcoinresearchd
sudo apt-get -y install unzip ntp

echo "-=-=-=- Creating Swap -=-=-=-"
sudo su -c "dd if=/dev/zero of=/swapfile bs=1M count=2048 ; mkswap /swapfile ; swapon /swapfile"
echo '/swapfile swap swap defaults 0 0' | sudo tee -a /etc/fstab

echo "-=-=-=- Setting up NTP -=-=-=-"
/etc/init.d/ntp start

echo "-=-=-=- Create Gridcoin User -=-=-=-"
sudo useradd -m gridcoin

echo "-=-=-=- Creating config-=-=-=-"
cd /home/gridcoin
sudo -u gridcoin mkdir .GridcoinResearch
cd /home/gridcoin/.GridcoinResearch/
sudo -u gridcoin wget https://download.gridcoin.us/download/downloadstake/signed/snapshot.zip&&sudo unzip snapshot.zip&&sudo rm snapshot.zip
sudo chown -R gridcoin:gridcoin /home/gridcoin/.GridcoinResearch/*
config="/home/gridcoin/.GridcoinResearch/gridcoinresearch.conf"
{'fraction_non_alphanumeric': 0.20065861690450054, 'fraction_numerical': 0.01756311745334797, 'mean_word_length': 3.8468085106382977, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '483169', 'n_tokens_mistral': 1685, 'n_tokens_neox': 1483, 'n_words': 450}