<commit_before>#!/bin/bash
#########################################
##        ENVIRONMENTAL CONFIG         ##
#########################################

# Configure user nobody to match unRAID's settings
export DEBIAN_FRONTEND="noninteractive"
usermod -u 99 nobody
usermod -g 100 nobody
usermod -d /home nobody
chown -R nobody:users /home

# Disable SSH
rm -rf /etc/service/sshd /etc/service/cron /etc/service/syslog-ng /etc/my_init.d/00_regen_ssh_host_keys.sh

#########################################
##    REPOSITORIES AND DEPENDENCIES    ##
#########################################

# Repositories
curl -skL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
curl -skL http://www.bchemnet.com/suldr/suldr.gpg | apt-key add -
add-apt-repository "deb http://dl.google.com/linux/chrome/deb/ stable main"
add-apt-repository "deb http://www.bchemnet.com/suldr/ debian extra"

# Use mirrors
sed -i -e "s#http://[^\s]*archive.ubuntu[^\s]* #mirror://mirrors.ubuntu.com/mirrors.txt #g" /etc/apt/sources.list

# Install Dependencies
apt-get update -qq
apt-get install -qy --force-yes cups cups-pdf whois hplip suld-driver-4.01.17 python-cups inotify-tools libcups2 libavahi-client3 avahi-daemon libsnmp30 build-essential libcups2-dev libavahi-client-dev git bzr

## install go (https://golang.org/doc/install)
wget https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.7.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

# Add AirPrint config tool
curl -skL https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py /opt/airprint-generate.py -o /opt/airprint-generate.py
chmod +x /opt/airprint-generate.py

#########################################
##  FILES, SERVICES AND CONFIGURATION  ##
#########################################

# Add files
cp -f /tmp/*.conf /etc/cups/
cp -f /tmp/etc-pam.d-cups /etc/pam.d/cups
# removed cp -f /tmp/generate_cloudprint_config.py /opt/generate_cloudprint_config.py
# removed chmod +x /opt/generate_cloudprint_config.py
mkdir -p /etc/cups/ssl

# Add services
# Add firstrun.sh to execute during container startup<commit_msg>export go version<commit_after>#!/bin/bash
#########################################
##        ENVIRONMENTAL CONFIG         ##
#########################################

# Configure user nobody to match unRAID's settings
export DEBIAN_FRONTEND="noninteractive"
usermod -u 99 nobody
usermod -g 100 nobody
usermod -d /home nobody
chown -R nobody:users /home

# Disable SSH
rm -rf /etc/service/sshd /etc/service/cron /etc/service/syslog-ng /etc/my_init.d/00_regen_ssh_host_keys.sh

#########################################
##    REPOSITORIES AND DEPENDENCIES    ##
#########################################

# Repositories
## curl -skL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
curl -skL http://www.bchemnet.com/suldr/suldr.gpg | apt-key add -
## add-apt-repository "deb http://dl.google.com/linux/chrome/deb/ stable main"
add-apt-repository "deb http://www.bchemnet.com/suldr/ debian extra"

# Use mirrors
sed -i -e "s#http://[^\s]*archive.ubuntu[^\s]* #mirror://mirrors.ubuntu.com/mirrors.txt #g" /etc/apt/sources.list

# Install Dependencies
apt-get update -qq
apt-get install -qy --force-yes cups cups-pdf whois hplip suld-driver-4.01.17 python-cups inotify-tools libcups2 libavahi-client3 avahi-daemon libsnmp30 build-essential libcups2-dev libavahi-client-dev git bzr

## install go (https://golang.org/doc/install)
wget https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.7.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

go version

# Add AirPrint config tool
curl -skL https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py /opt/airprint-generate.py -o /opt/airprint-generate.py
chmod +x /opt/airprint-generate.py

## install google print connector
go get github.com/google/cloud-print-connector/...


#########################################
##  FILES, SERVICES AND CONFIGURATION  ##
#########################################

# Add files
cp -f /tmp/*.conf /etc/cups/
cp -f /tmp/etc-pam.d-cups /etc/pam.d/cups
# removed cp -f /tmp/generate_cloudprint_config.py /opt/generate_cloudprint_config.py
# removed chmod +x /opt/generate_cloudprint_config.py
mkdir -p /etc/cups/ssl

# Add services
# Add firstrun.sh to execute during container startup
{'fraction_non_alphanumeric': 0.23346215048874744, 'fraction_numerical': 0.012275517162991589, 'mean_word_length': 4.282112845138055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '589986', 'n_tokens_mistral': 1608, 'n_tokens_neox': 1499, 'n_words': 318}