From 5964f787555ba0e9749347e8b1b4192dd5632482 Mon Sep 17 00:00:00 2001 From: sean Date: Thu, 18 Jul 2019 18:30:57 -0700 Subject: [PATCH] tweaks --- setup.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/setup.sh b/setup.sh index 690c7e4..5862e4e 100644 --- a/setup.sh +++ b/setup.sh @@ -271,14 +271,9 @@ echo "cp /usr/share/zoneinfo/$timezone /etc/localtime" >> /mnt/setup-chroot.sh echo "echo \"Done.\"" >> /mnt/setup-chroot.sh echo "echo \"\"" >> /mnt/setup-chroot.sh -echo "echo \"Installing linux image, bash, screen, tmux, zfs, vim, curl, sharutils, libvirt-bin, docker, dnsutils, dosfstools, openssh, bridge-utils, net-utils, ufw...\"" >> /mnt/setup-chroot.sh +echo "echo \"Installing linux image, ifupdown dnsutils nfs-kernel-server apparmor-profiles vim bridge-utils net-tools bash screen tmux zfs-initramfs dosfstools mailutils ssmtp openssh-server ufw docker.io sharutils...\"" >> /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 $fqdn\"" >> /mnt/setup-chroot.sh -echo "errors=\$(DEBCONF_FRONTEND='noninteractive' apt install -y --no-install-recommends linux-image-generic 2>&1 1>/dev/null && apt purge -y netplan 2>&1 1>/dev/null && apt autoremove -y 2>&1 1>/dev/null && DEBCONF_FRONTEND='noninteractive' apt install -y ifupdown dnsutils nfs-kernel-server apparmor-profiles vim bridge-utils putty-tools net-tools bash screen tmux zfs-initramfs dosfstools mailutils ssmtp openssh-server ufw 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 sendmail mailutils docker.io sharutils" >> /mnt/setup-chroot.sh +echo "errors=\$(DEBCONF_FRONTEND='noninteractive' apt install -y --no-install-recommends linux-image-generic 2>&1 1>/dev/null && apt purge -y netplan 2>&1 1>/dev/null && apt autoremove -y 2>&1 1>/dev/null && DEBCONF_FRONTEND='noninteractive' apt install -y ifupdown dnsutils nfs-kernel-server apparmor-profiles vim bridge-utils net-tools bash screen tmux zfs-initramfs dosfstools mailutils ssmtp openssh-server ufw docker.io sharutils 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh echo ' echo "Failed to install preliminary software - $errors"' >> /mnt/setup-chroot.sh @@ -468,7 +463,7 @@ else connection="$address" fi # --content-filename=\"${hostname}.ssh.key\" --content-name=\"${hostname}.ssh.key\" -echo "(echo \"Server available at $connection\"; cat \"/home/${admin}/.ssh/id_rsa\") | mail -s \"$hostname SSH key\" -A \"/home/${admin}/.ssh/id_rsa\" \"${admins}\"" >> /mnt/setup-chroot.sh +echo "(echo \"Server available at $connection\"; cat \"/home/${admin}/.ssh/id_rsa\") | mail -s \"$hostname SSH key\" -A \"/home/${admin}/.ssh/id_rsa\" -r \"${email}\" \"${admins}\"" >> /mnt/setup-chroot.sh echo "echo \"Done.\"" >> /mnt/setup-chroot.sh echo "exit 0" >> /mnt/setup-chroot.sh @@ -524,7 +519,7 @@ echo "fi">> /mnt/setup-chroot.sh echo "echo \"Done.\"" >> /mnt/setup-chroot.sh -echo "systemctl enable cron" >> /mnt/setup-chroot.sh +echo "systemctl unmask cron 2>/dev/null 1>/dev/null; systemctl enable cron 2>/dev/null 1>/dev/null" >> /mnt/setup-chroot.sh #crontab -l > mycron #echo new cron into cron file #echo "00 09 * * 1-5 echo hello" >> mycron