From 82fe1cea2bf42d13d7de78da988ae555a38a1211 Mon Sep 17 00:00:00 2001 From: sean Date: Thu, 18 Jul 2019 17:07:26 -0700 Subject: [PATCH] tweaks --- setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 7b430df..06e45fd 100644 --- a/setup.sh +++ b/setup.sh @@ -460,7 +460,11 @@ echo "echo \"UseSTARTTLS=YES\" >> /etc/ssmtp/ssmtp.conf" >> /mnt/setup-chroot.sh echo "echo \"\"" >> /mnt/setup-chroot.sh echo "echo \"Sending SSH key via e-mail...\"" >> /mnt/setup-chroot.sh -if [ "$networktype" = "dhcp" ]; then connection = `hostname -I`; else connection = "$address"; fi +if [ "$networktype" = "dhcp" ]; then + connection=`hostname -I` +else + connection="$address" +fi echo "(echo \"Server available at $connection\"; cat \"/home/${admin}/.ssh/id_rsa\") | mail -s \"$hostname SSH key\" -A \"/home/${admin}/.ssh/id_rsa\" --content-filename=\"${hostname}.ssh.key\" --content-name=\"${hostname}.ssh.key\" ${admins}" >> /mnt/setup-chroot.sh echo "echo \"Done.\"" >> /mnt/setup-chroot.sh