cdist-contrib/type/__dma/gencode-remote

32 lines
554 B
Bash
Executable File

#!/bin/sh -e
if test -f "${__object}/parameter/send-test-email"
then
modified=false
if grep -q '^__mail_alias/root:' "${__messages_in}"
then
modified=true
elif grep -q '^__dma_auth/' "${__messages_in}"
then
modified=true
elif grep -q '^__dma/' "${__messages_in}"
then
modified=true
fi
if $modified
then
cat <<-EOF
sendmail root <<EOM
Subject: [cdist] Testing mail on '${__target_host}'
You can safely ignore this message. It means your system will notify you
correctly of any relevant messages.
Enjoy!
EOM
EOF
fi
fi