Browse Source

Fix array loop

master
Pekka Helenius 4 years ago
parent
commit
7c2f2eab9c
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      ssmtp_conf-sample/wanchecker.sh

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

@ -277,10 +277,8 @@ function checkWANIP {
IFS= IFS=
MAIL_SENT_STATUSES_STR="" MAIL_SENT_STATUSES_STR=""
for status in ${MAIL_SENT_STATUSES[@]}; do
for email in ${!MAIL_SENT_STATUSES[@]}; do
MAIL_SENT_STATUSES_STR="${MAIL_SENT_STATUSES_STR}${email}:${status},"
done
for email in ${!MAIL_SENT_STATUSES[@]}; do
MAIL_SENT_STATUSES_STR="${MAIL_SENT_STATUSES_STR}${email}:${MAIL_SENT_STATUSES[$email]},"
done done
MAIL_SENT_STATUSES_STR=$(echo "${MAIL_SENT_STATUSES_STR}" | sed 's/,$//') MAIL_SENT_STATUSES_STR=$(echo "${MAIL_SENT_STATUSES_STR}" | sed 's/,$//')


Loading…
Cancel
Save