test
sean 7 years ago
parent 8fe7616b38
commit 2e799692f5

@ -239,11 +239,11 @@ echo "echo \"\"" >> /mnt/setup-chroot.sh
echo "echo \"Installing linux image, bash, screen, tmux, zfs, vim, sharutils, docker, dosfstools, mailutils, openssh, ufw...\"" >> /mnt/setup-chroot.sh
# preconfigure postfix for no configuration
echo "debconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No configuration'\"" >> /mnt/setup-chroot.sh
echo "debconf-set-selections <<< \"postfix postfix/mailname string $hostname\"" >> /mnt/setup-chroot.sh
#echo "debconf-set-selections <<< \"postfix postfix/main_mailer_type string 'No configuration'\"" >> /mnt/setup-chroot.sh
#echo "debconf-set-selections <<< \"postfix postfix/mailname string $hostname\"" >> /mnt/setup-chroot.sh
#echo "errors=\$(apt install -y --no-install-recommends linux-image-generic 2>&1 1>/dev/null && apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server ufw mailutils docker.io sharutils 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
echo "DEBCONF_FRONTEND='noninteractive' apt install -y --no-install-recommends linux-image-generic && apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server ufw mailutils docker.io sharutils" >> /mnt/setup-chroot.sh
echo "DEBCONF_FRONTEND='noninteractive' apt install -y --no-install-recommends linux-image-generic && apt install -y vim bash screen tmux zfs-initramfs dosfstools openssh-server ufw sendmail mailutils docker.io sharutils" >> /mnt/setup-chroot.sh
echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh
echo ' echo "Failed to install preliminary software - $errors"' >> /mnt/setup-chroot.sh
@ -392,8 +392,8 @@ echo "chown -R ${admin}:${admin} \"/home/${admin}\"" >> /mnt/setup-chroot.sh
echo "echo \"admin: ${admins}\" >> /etc/aliases" >> /mnt/setup-chroot.sh
echo "newaliases" >> /mnt/setup-chroot.sh
echo "systemctl enable postfix" >> /mnt/setup-chroot.sh
echo "service postfix start" >> /mnt/setup-chroot.sh
echo "systemctl enable sendmail" >> /mnt/setup-chroot.sh
echo "service sendmail start" >> /mnt/setup-chroot.sh
echo "cat \"/home/${admin}/.ssh/id_rsa.pub\" | mail -s \"$hostname SSH key\" -A \"/home/${admin}/.ssh/id_rsa.pub\" admin" >> /mnt/setup-chroot.sh
# uuencode test.csv test.csv | mail -v -s "Subject test" -r no-reply@mydomain.co.uk recepient@mydomain.co.uk

Loading…
Cancel
Save