Skip to content
Snippets Groups Projects
Commit 871a73ec authored by Martin Strbacka's avatar Martin Strbacka
Browse files

notifier: msmtp config moved to locker_stamp folder.

parent 2d337124
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ mkdir -p "$base_folder"
locker_stamp="$base_folder/.locked"
msg_file="$locker_stamp/msg.mail"
msmtp_cfg_file=/tmp/msmtp.cfg.$$
msmtp_cfg_file="$locker_stamp/msmtp.cfg.$$"
mail_stamp="sent_by_email"
smtp_enabled=`uci get user_notify.smtp.enable`
......@@ -165,6 +165,7 @@ send_mail() {
lock "$locker_stamp"
trap 'unlock "$locker_stamp"' EXIT ABRT QUIT TERM
create_msmtp_config
compose_message
if [ ! -f "$msg_file" ]; then
......@@ -181,7 +182,6 @@ send_mail() {
cat "$msg_file" | msmtp -C "$msmtp_cfg_file" "$mail_to"
err_lvl=$?
rm -f "$msmtp_cfg_file"
if [ "$err_lvl" -eq 0 ]; then
mark_msgs
else
......@@ -193,7 +193,6 @@ send_mail() {
unlock "$locker_stamp"
}
create_msmtp_config
send_mail
exec user-notify-cleaner
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment