Browse Source

Define ssmtp executable path

master
Pekka Helenius 2 years ago
parent
commit
502cb616a0
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      ssmtp_conf-sample/wanchecker.conf
  2. +2
    -2
      ssmtp_conf-sample/wanchecker.sh

+ 3
- 0
ssmtp_conf-sample/wanchecker.conf View File

@ -1,3 +1,6 @@
# sSMTP executable path
ssmtp_exec="/usr/bin/ssmtp"
# Cache/Log directory of the script
WANIP_DIR="/var/spool/mail"


+ 2
- 2
ssmtp_conf-sample/wanchecker.sh View File

@ -237,13 +237,13 @@ function checkWANIP {
local EMAIL_FORM="To: ${1}\nFrom: ${EMAIL_SENDER}\nSubject: ${SUBJECT_EMAIL}\n\n${MESSAGE_EMAIL}"
echo -e "${EMAIL_FORM}" | ssmtp -v "${1}"
echo -e "${EMAIL_FORM}" | ${ssmtp_exec} -v "${1}"
if [[ $? -eq 0 ]]; then
MAIL_SENT="OK"
else
if [[ -f "/usr/lib/libresolvconf-override.so" ]] && [[ $ENABLE_FALLBACK_DNS == 1 ]]; then
SENDMAIL_PRELOAD="LD_PRELOAD=/usr/lib/libresolvconf-override.so $(resolvconfOverrideDNSList)"
echo -e "${EMAIL_FORM}" | $(eval ${SENDMAIL_PRELOAD} ssmtp -v "${1}")
echo -e "${EMAIL_FORM}" | $(eval ${SENDMAIL_PRELOAD} ${ssmtp_exec} -v "${1}")
if [[ $? -eq 0 ]]; then
MAIL_SENT="OK"
fi


Loading…
Cancel
Save