<commit_before>#!/bin/ash
#
# startscript: normaly run it only once
# (c) 2015/2016 <EMAIL>  www.sosyco.de
# 
# enhance the repositories and update the system
if ! [ -f "/etc/apk/repositories.org" ]; 
then 
  cp /etc/apk/repositories /etc/apk/repositories.org
  sed -ni 'p; s/\/main/\/community/p' /etc/apk/repositories
fi
apk update
apk upgrade
apk add git sudo docker
rc-update add docker boot

# add new user "dockeradmin" without password 
# and generate sshkeys
getent passwd dockeradmin > /dev/null 2&>1
if ! [ $? -eq 0 ]; 
then 
  ssh-keygen -f dockeradmin -t rsa -b 4096 -C dockeradmin -N ''
  adduser -D dockeradmin
  mkdir -p /home/dockeradmin/.ssh/
  cp dockeradmin.pub /home/dockeradmin/.ssh/authorized_keys
  chmod 700 -R /home/dockeradmin/.ssh 
  chown dockeradmin.dockeradmin -R /home/dockeradmin/.ssh
  echo "dockeradmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
  adduser dockeradmin docker
fi
sed -i "s/DOCKER_OPTS.*/DOCKER_OPTS=\"--bip=192.168.199.1\/24\"/" /etc/conf.d/docker
echo "don't forget to save the private sshkey: dockeardmin"

<commit_msg>Update installation.ash<commit_after>#!/bin/ash
#
# startscript: normaly run it only once
# (c) 2015/2016 <EMAIL>  www.sosyco.de
# 
# enhance the repositories and update the system
if ! [ -f "/etc/apk/repositories.org" ]; 
then 
  cp /etc/apk/repositories /etc/apk/repositories.org
  sed -ni 'p; s/\/main/\/community/p' /etc/apk/repositories
fi
apk update
apk upgrade
apk add git sudo docker
rc-update add docker boot

# add new user "dockeradmin" without password 
# and generate sshkeys
getent passwd dockeradmin > /dev/null 2&>1
if ! [ $? -eq 0 ]; 
then 
  ssh-keygen -f dockeradmin -t rsa -b 4096 -C dockeradmin -N ''
  adduser -D -S /bin/ash dockeradmin
  sed -i "s/dockeradmin\:!/dockeradmin\:/g" /etc/shadow
  mkdir -p /home/dockeradmin/.ssh/
  cp dockeradmin.pub /home/dockeradmin/.ssh/authorized_keys
  chmod 700 -R /home/dockeradmin/.ssh 
  chown dockeradmin.dockeradmin -R /home/dockeradmin/.ssh
  echo "dockeradmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
  adduser dockeradmin docker
fi
sed -i "s/DOCKER_OPTS.*/DOCKER_OPTS=\"--bip=192.168.199.1\/24\"/" /etc/conf.d/docker
echo "don't forget to save the private sshkey: dockeardmin"

# generate containeradmin (if we need one)
sh-keygen -f containeradmin -t rsa -b 4096 -C containeradmin -N ''
mkdir -p /home/dockeradmin/container/ssh/containeradmin
cp containeradmin.pub /home/dockeradmin/container/ssh/containeradmin/authorized_keys
cp containeradmin /home/dockeradmin/.ssh/containeradmin
chmod 700 -R /home/dockeradmin/.ssh 
chown dockeradmin.dockeradmin -R /home/dockeradmin/.ssh
chmod 755 -R /home/dockeradmin/container/ssh/containeradmin

{'fraction_non_alphanumeric': 0.12827225130890052, 'fraction_numerical': 0.02617801047120419, 'mean_word_length': 3.572649572649573, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '1497710', 'n_tokens_mistral': 1105, 'n_tokens_neox': 939, 'n_words': 268}