tweaks
This commit is contained in:
@@ -169,10 +169,12 @@ fi
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
echo "Setting hostname..."
|
||||
echo "Setting hostname and e-mail admins..."
|
||||
echo "$hostname" > /mnt/etc/hostname
|
||||
echo "127.0.0.1 $hostname $fqdn" > /mnt/etc/hosts
|
||||
echo "127.0.1.1 $hostname" >> /mnt/etc/hosts
|
||||
echo "${admins}" > /mnt/admins
|
||||
chmod o+r /mnt/admins
|
||||
echo "Done."
|
||||
|
||||
echo ""
|
||||
@@ -473,7 +475,7 @@ fi
|
||||
# --content-filename=\"${hostname}.ssh.key\" --content-name=\"${hostname}.ssh.key\"
|
||||
echo "serverinfo=\`cat \"/home/${admin}/.ssh/id_rsa\"\`" >> /mnt/setup-chroot.sh
|
||||
#echo "serverinfo=\"Server available at $connection\\n\$serverinfo\"; echo \"\$serverinfo\" | mail -s \"$hostname SSH key\" -A \"/home/${admin}/.ssh/id_rsa\" -r \"${email}\" \"${admins}\"" >> /mnt/setup-chroot.sh
|
||||
echo "serverinfo=\"Server available at $connection\\n\\n\$serverinfo\"; echo -e \"\$serverinfo\" | mail -s \"$hostname SSH key\" -r \"${email}\" \"${admins}\"" >> /mnt/setup-chroot.sh
|
||||
echo "serverinfo=\"Server available at $connection\\n\\n\$serverinfo\"; echo -e \"\$serverinfo\" | mail -s \"$hostname SSH key\" -r \"${email}\" \"\`cat /admins\`\"" >> /mnt/setup-chroot.sh
|
||||
echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
||||
|
||||
|
||||
@@ -613,7 +615,7 @@ echo " emailMessage=\"\${emailMessage}Pool: \$volume needs scrub \n\"" >> /
|
||||
echo " fi" >> /mnt/zfshealth.sh
|
||||
echo " done" >> /mnt/zfshealth.sh
|
||||
echo "fi" >> /mnt/zfshealth.sh
|
||||
echo "echo -e \"\$emailMessage \n\n\n \`/sbin/zpool list\` \n\n\n \`/sbin/zpool status\`\" | mail -r \"${email}\" -s \"\$emailSubject\" \"${admins}\"" >> /mnt/zfshealth.sh
|
||||
echo "echo -e \"\$emailMessage \n\n\n \`/sbin/zpool list\` \n\n\n \`/sbin/zpool status\`\" | mail -r \"${email}\" -s \"\$emailSubject\" \"\`cat /admins\`\"" >> /mnt/zfshealth.sh
|
||||
echo "if [ \"\$problems\" -ne 0 ]; then logger \$emailSubject; fi" >> /mnt/zfshealth.sh
|
||||
|
||||
chmod +x /mnt/zfshealth.sh
|
||||
|
||||
Reference in New Issue
Block a user