From 9beb27fce4401d4d107a99b97bc1943a70dd88f9 Mon Sep 17 00:00:00 2001 From: sean Date: Tue, 16 Jul 2019 17:56:55 -0700 Subject: [PATCH] tweaks --- setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index 9a3e144..de7b322 100644 --- a/setup.sh +++ b/setup.sh @@ -261,7 +261,7 @@ echo "echo \"Installing linux image, bash, screen, tmux, zfs, vim, sharutils, do # 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 "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 && DEBCONF_FRONTEND='noninteractive' apt install -y ifupdown dnsutils vim bridge-utils net-tools bash screen tmux zfs-initramfs dosfstools openssh-server ufw sendmail mailutils docker.io sharutils 2>&1 1>/dev/null)" >> /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 && DEBCONF_FRONTEND='noninteractive' apt install -y ifupdown dnsutils vim bridge-utils net-tools 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 sendmail mailutils docker.io sharutils" >> /mnt/setup-chroot.sh @@ -434,20 +434,20 @@ echo "chown -R ${admin}:${admin} \"/home/${admin}\"/.ssh" >> /mnt/setup-chroot.s echo "mkdir /var/spool/mqueue/ && mkdir /var/spool/mqueue-client/" >> /mnt/setup-chroot.sh echo "echo \"admin: ${admins}\" >> /etc/aliases" >> /mnt/setup-chroot.sh echo "newaliases" >> /mnt/setup-chroot.sh -echo "systemctl enable sendmail" >> /mnt/setup-chroot.sh +#echo "systemctl enable #" >> /mnt/setup-chroot.sh echo "chown smmsp:smmsp /var/spool/mqueue" >> /mnt/setup-chroot.sh echo "chmod g+w /var/spool/mqueue" >> /mnt/setup-chroot.sh echo "chown smmsp:smmsp /var/spool/mqueue-client" >> /mnt/setup-chroot.sh echo "chmod g+w /var/spool/mqueue-client" >> /mnt/setup-chroot.sh echo "HOME=\"/root\"" >> /mnt/setup-chroot.sh echo "HOSTNAME=\"$hostname\"" >> /mnt/setup-chroot.sh -echo "echo \"y\\ny\\ny\\n\" | sendmailconfig" >> /mnt/setup-chroot.sh +#echo "echo \"y\\ny\\ny\\n\" | sendmailconfig" >> /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 #echo "sendmail -OTimeout.hoststatus=0m -q -v" >> /mnt/setup-chroot.sh -echo "service sendmail stop" >> /mnt/setup-chroot.sh +#echo "service sendmail stop" >> /mnt/setup-chroot.sh echo "exit 0" >> /mnt/setup-chroot.sh @@ -483,7 +483,7 @@ else echo " netmask $subnet" >> /mnt/etc/network/interfaces.d/br0 echo " gateway $gateway" >> /mnt/etc/network/interfaces.d/br0 sed -ir "s/^#DNS=.*/DNS=${dns1}/g" /mnt/etc/systemd/resolved.conf - if ! [ -z "$dns2"]; then sed -ir "s/^#FallbackDNS=.*/FallbackDNS=${dns2}/g" /mnt/etc/systemd/resolved.conf ; fi + if ! [ -z "$dns2" ]; then sed -ir "s/^#FallbackDNS=.*/FallbackDNS=${dns2}/g" /mnt/etc/systemd/resolved.conf ; fi fi #echo " bridge_hw $macaddr" >> /mnt/etc/network/interfaces.d/br0 echo " dns-nameservers 127.0.0.53" >> /mnt/etc/network/interfaces.d/br0