all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob d0a2813812d2d756254487564168c03d02da6006 2095 bytes (raw)
name: gnu/packages/patches/msmtpq-add-env-variables.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
 
From 511be91b0aad2dc9bcb9ae16b4576cd01787ac34 Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew@trop.in>
Date: Fri, 9 Jul 2021 08:29:19 +0300
Subject: [PATCH] msmtpq: Allow to control queue dir, log file, etc via env
 variables

Provided variables:
MSMTPQ_QUEUE_DIR
MSMTPQ_LOG
MSMTPQ_QUIET
MSMTPQ_CONN_TEST
---
 scripts/msmtpq/msmtpq | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/scripts/msmtpq/msmtpq b/scripts/msmtpq/msmtpq
index 4b074de..fbf38f9 100755
--- a/scripts/msmtpq/msmtpq
+++ b/scripts/msmtpq/msmtpq
@@ -70,9 +70,9 @@ MSMTP=msmtp
 ##            ( chmod 0700 msmtp.queue )
 ##
 ## the queue dir - modify this to reflect where you'd like it to be  (no quotes !!)
-Q=~/.msmtp.queue
-[ -d "$Q" ] || \
-  err '' "msmtpq : can't find msmtp queue directory [ $Q ]" ''     # if not present - complain ; quit
+Q=${MSMTPQ_QUEUE_DIR:-~/.msmtp.queue}
+[ -d "$Q" ] || mkdir -p "$Q" || \
+  err '' "msmtpq : can't create msmtp queue directory [ $Q ]" ''
 ##
 ## set the queue log file var to the location of the msmtp queue log file
 ##   where it is or where you'd like it to be
@@ -84,7 +84,8 @@ Q=~/.msmtp.queue
 ##     (doing so would be inadvisable under most conditions, however)
 ##
 ## the queue log file - modify (or comment out) to taste  (but no quotes !!)
-LOG=~/log/msmtp.queue.log
+LOG=${MSMTPQ_LOG:-~/log/msmtp.queue.log}
+[ -d "$(dirname $LOG)" ] || mkdir -p "$(dirname $LOG)"
 ## ======================================================================================
 
 ## msmtpq can use the following environment variables :
@@ -108,8 +109,8 @@ LOG=~/log/msmtp.queue.log
 ##
 #EMAIL_CONN_NOTEST=y                 # deprecated ; use below var
 #EMAIL_CONN_TEST={x| |p|P|n|s}       # see settings above for EMAIL_CONN_TEST
-EMAIL_CONN_TEST=n
-#EMAIL_QUEUE_QUIET=t
+EMAIL_QUEUE_QUIET=${MSMTPQ_QUIET:-}
+EMAIL_CONN_TEST=${MSMTPQ_CONN_TEST:-n}
 ## ======================================================================================
 
 umask 077                            # set secure permissions on created directories and files
-- 
2.32.0


debug log:

solving d0a2813812 ...
found d0a2813812 in https://yhetil.org/guix/877dhzzstl.fsf@trop.in/

applying [1/1] https://yhetil.org/guix/877dhzzstl.fsf@trop.in/
diff --git a/gnu/packages/patches/msmtpq-add-env-variables.patch b/gnu/packages/patches/msmtpq-add-env-variables.patch
new file mode 100644
index 0000000000..d0a2813812

1:47: trailing whitespace.
 
1:58: trailing whitespace.
 
1:60: trailing whitespace.
-- 
Checking patch gnu/packages/patches/msmtpq-add-env-variables.patch...
1:62: new blank line at EOF.
+
Applied patch gnu/packages/patches/msmtpq-add-env-variables.patch cleanly.
warning: 4 lines add whitespace errors.

index at:
100644 d0a2813812d2d756254487564168c03d02da6006	gnu/packages/patches/msmtpq-add-env-variables.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.