mlmmj.mlmmj.org archive mirror
 help / color / mirror / Atom feed
* [mlmmj] [PATCH] add user to crontab instructions
@ 2016-05-24 17:44 Chris Knadle
  0 siblings, 0 replies; only message in thread
From: Chris Knadle @ 2016-05-24 17:44 UTC (permalink / raw
  To: mlmmj


[-- Attachment #1.1.1: Type: text/plain, Size: 779 bytes --]

The instructions for making a crontab entry for mlmmj-maintd currently
leaves out the user to execute the entry with.  Unfortunately if an
administrator does as suggested by the output of mlmmj-make-ml and
copy/pastes the suggestion to /etc/crontab, it seems other crontab entries
fail to run.

mlmmj-make-ml also mentions running mlmmj-maintd "in daemon mode" which
seems to add confusion; it seems better to simplify this to discussing a
crontab entry, given that the suggestion in both the mlmmj-make-ml output
and the README is to run it that way and there isn't further discussion of
"daemon mode" in the README nor an init script shipped for doing so.

The attach patch addresses both issues.
Thanks
  -- Chris

-- 
Chris Knadle
Chris.Knadle@coredump.us

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 07_fix-crontab-suggestions.diff --]
[-- Type: text/x-diff; name="07_fix-crontab-suggestions.diff", Size: 1957 bytes --]

Description: Alter the mlmmj instructions for making a crontab entry, which
 by default tells the user to add an entry without specifying the user.
Author: Christopher Knadle <Chris.Knadle@coredump.us>
Bug-Debian: https://bugs.debian.org/804436
Last-Updated: 2016-05-22

--- a/src/mlmmj-make-ml
+++ b/src/mlmmj-make-ml
@@ -133,7 +133,7 @@
 fi
 
 ALIAS="$LISTNAME:  \"|$MLMMJRECEIVE -L $SPOOLDIR/$LISTNAME/\""
-CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$LISTNAME/\""
+CRONENTRY="0 */2 * * * root $MLMMJMAINTD -F -L $SPOOLDIR/$LISTNAME/"
 
 if [ -n "$A_CREATE" ]; then
 	echo "I want to add the following to your $ALIASFILE file:"
@@ -175,8 +175,10 @@
 fi
 
 echo
-echo "If you're not starting mlmmj-maintd in daemon mode,"
-echo "don't forget to add this to your crontab:"
+echo "If you're not running mlmmj-maintd for all mailing lists"
+echo "in /var/spool/mlmmj such as"
+echo "   /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj"
+echo "via cron, then don't forget to add this to your crontab:"
 echo "$CRONENTRY"
 
 echo
--- a/README
+++ b/README
@@ -95,11 +95,11 @@
  4) Start mlmmj-maintd (remember full path when starting it!) or add it to
     crontab with -F switch. The recommended way for now is to run it via cron:
 
-    "0 */2 * * *  /usr/bin/mlmmj-maintd -F -L /var/spool/mlmmj/mlmmj-test"
+    0 */2 * * *  root /usr/bin/mlmmj-maintd -F -L /var/spool/mlmmj/mlmmj-test
 
-    It should be started as root, as mlmmj-maintd will become the user owning
-    the listdir (/var/spool/mlmmj/mlmmj-test), and log it's last maintenance
-    run to listdir/mlmmj-maintd.lastrun.log.
+    Started as root, as mlmmj-maintd will become the user owning the listdir
+    (/var/spool/mlmmj/mlmmj-test), and log it's last maintenance run to
+    listdir/mlmmj-maintd.lastrun.log.
 
     If you have several lists below /var/spool/mlmmj you can use -d:
     /usr/bin/mlmmj-maintd -F -d /var/spool/mlmmj

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-24 17:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 17:44 [mlmmj] [PATCH] add user to crontab instructions Chris Knadle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).