|
|
|
@ -453,12 +453,12 @@ echo "echo \"AuthPass=${emailpassword}\" >> /etc/ssmtp/ssmtp.conf" >> /mnt/setup
|
|
|
|
echo "echo \"mailhub=${smtp}\" >> /etc/ssmtp/ssmtp.conf" >> /mnt/setup-chroot.sh
|
|
|
|
echo "echo \"mailhub=${smtp}\" >> /etc/ssmtp/ssmtp.conf" >> /mnt/setup-chroot.sh
|
|
|
|
echo "echo \"UseSTARTTLS=YES\" >> /etc/ssmtp/ssmtp.conf" >> /mnt/setup-chroot.sh
|
|
|
|
echo "echo \"UseSTARTTLS=YES\" >> /etc/ssmtp/ssmtp.conf" >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
|
|
echo "mkdir -p /var/spool/mqueue/ && mkdir -p /var/spool/mqueue-client/" >> /mnt/setup-chroot.sh
|
|
|
|
#echo "mkdir -p /var/spool/mqueue/ && mkdir -p /var/spool/mqueue-client/" >> /mnt/setup-chroot.sh
|
|
|
|
#echo "systemctl enable " >> /mnt/setup-chroot.sh
|
|
|
|
#echo "systemctl enable " >> /mnt/setup-chroot.sh
|
|
|
|
echo "chown smmta:smmsp /var/spool/mqueue" >> /mnt/setup-chroot.sh
|
|
|
|
#echo "chown smmta:smmsp /var/spool/mqueue" >> /mnt/setup-chroot.sh
|
|
|
|
echo "chmod g+w /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 "chown smmsp:smmsp /var/spool/mqueue-client" >> /mnt/setup-chroot.sh
|
|
|
|
echo "chmod g+w /var/spool/mqueue-client" >> /mnt/setup-chroot.sh
|
|
|
|
#echo "chmod g+w /var/spool/mqueue-client" >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#NCAkaTpIZ8uJ
|
|
|
|
#NCAkaTpIZ8uJ
|
|
|
|
@ -542,7 +542,7 @@ echo "Done."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "#! /bin/bash" > /mnt/zfshealth.sh
|
|
|
|
echo "#! /bin/bash" > /mnt/zfshealth.sh
|
|
|
|
echo "problems=0; emailSubject=\"`hostname` - ZFS pool - HEALTH check\"; emailMessage=\"\"" >> /mnt/zfshealth.sh
|
|
|
|
echo "problems=0; emailSubject=\"\`hostname\` - ZFS pool - HEALTH check\"; emailMessage=\"\"" >> /mnt/zfshealth.sh
|
|
|
|
echo "condition=\$(/sbin/zpool status | egrep -i '(DEGRADED|FAULTED|OFFLINE|UNAVAIL|REMOVED|FAIL|DESTROYED|corrupt|cannot|unrecover)')" >> /mnt/zfshealth.sh
|
|
|
|
echo "condition=\$(/sbin/zpool status | egrep -i '(DEGRADED|FAULTED|OFFLINE|UNAVAIL|REMOVED|FAIL|DESTROYED|corrupt|cannot|unrecover)')" >> /mnt/zfshealth.sh
|
|
|
|
echo "if [ \"\${condition}\" ]; then emailSubject=\"\$emailSubject - fault\"; problems=1; fi" >> /mnt/zfshealth.sh
|
|
|
|
echo "if [ \"\${condition}\" ]; then emailSubject=\"\$emailSubject - fault\"; problems=1; fi" >> /mnt/zfshealth.sh
|
|
|
|
echo "maxCapacity=80" >> /mnt/zfshealth.sh
|
|
|
|
echo "maxCapacity=80" >> /mnt/zfshealth.sh
|
|
|
|
@ -574,9 +574,9 @@ echo " emailMessage=\"\${emailMessage}Pool: \$volume needs scrub \n\"" >> /
|
|
|
|
echo " fi" >> /mnt/zfshealth.sh
|
|
|
|
echo " fi" >> /mnt/zfshealth.sh
|
|
|
|
echo " done" >> /mnt/zfshealth.sh
|
|
|
|
echo " done" >> /mnt/zfshealth.sh
|
|
|
|
echo "fi" >> /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 -s \"\$emailSubject\" ${admins}" >> /mnt/zfshealth.sh
|
|
|
|
echo "echo -e \"\$emailMessage \n\n\n \`/sbin/zpool list\` \n\n\n \`/sbin/zpool status\`\" | mail -s \"\$emailSubject\" ${admins}" >> /mnt/zfshealth.sh
|
|
|
|
echo "if [ \"\$problems\" -ne 0 ]; then logger \$emailSubject; fi" >> /mnt/zfshealth.sh
|
|
|
|
echo "if [ \"\$problems\" -ne 0 ]; then logger \$emailSubject; fi" >> /mnt/zfshealth.sh
|
|
|
|
|
|
|
|
chmod +x /mnt/zfshealth.sh
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
|
|
|
|
|