mlmmj.mlmmj.org archive mirror
 help / color / mirror / Atom feed
From: Chris Knadle <Chris.Knadle@coredump.us>
To: mlmmj@mlmmj.org
Subject: [mlmmj] [PATCH] add user to crontab instructions
Date: Tue, 24 May 2016 17:44:11 +0000	[thread overview]
Message-ID: <574492EB.2020101@coredump.us> (raw)


[-- 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 --]

                 reply	other threads:[~2016-05-24 17:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=574492EB.2020101@coredump.us \
    --to=chris.knadle@coredump.us \
    --cc=mlmmj@mlmmj.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).