#!/bin/sh

pw user add admin -m -G wheel

fetch http://46.4.69.36/loader.conf -o /boot/loader.conf
fetch http://46.4.69.36/sysctl.conf -o /etc/sysctl.conf

pkg install -y python2 ca_root_nss

mkdir -p /root/.ssh
chmod 700 /root/.ssh

mkdir -p /home/admin/.ssh
chown admin:admin /home/admin/.ssh
chmod 700 /home/admin/.ssh

echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDT7ubWEdPkek/gF5/ugeyTdzKj4vrTTRazOQUUmVEkV ed25519 256-020519 > /root/.ssh/authorized_keys
echo "" >> /root/.ssh/authorized_keys
echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGYL6Wo4L24DAA4EQyrvw18yL8eUC8qJbcRhpDq7JK4C mohshami@mac >> /root/.ssh/authorized_keys
echo "" >> /root/.ssh/authorized_keys

echo ssh-rsa [payload removed: 716 characters] root@master.dotjo.local >> /root/.ssh/authorized_keys
echo "" >> /root/.ssh/authorized_keys

echo ssh-rsa [payload removed: 716 characters] dotdev.local >> /root/.ssh/authorized_keys
echo "" >> /root/.ssh/authorized_keys

echo ssh-rsa [payload removed: 716 characters] root@sauron.dot.jo >> /home/admin/.ssh/authorized_keys
echo "" >> /root/.ssh/authorized_keys

fetch http://46.4.69.36/loader.conf -o /boot/loader.conf
fetch http://46.4.69.36/sysctl.conf -o /etc/sysctl.conf
fetch http://46.4.69.36/my.cnf -o /root/.my.cnf

# This is here just so we don't need to look for the command
# zfs allow -ldu admin send zroot/www
