[mlmmj] [PATCH] add user to crontab instructions

Chris Knadle <[email protected]>
Newsgroups org.mlmmj.mlmmj
Message-ID <[email protected]>
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
[email protected]
07_fix-crontab-suggestions.diff (text/x-diff, 1.9 KB)
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 <[email protected]>
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
signature.asc (application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXRJLrAAoJEEkSKbZEGfmqcJkP/A3mcuukv+ft8BmnHa7JhSWK
yiJ7BFCcXUMYGJsQNqwhdpiLY7cios3GY0nWiWTA13QOrQm8UV4Stk5psZuvy/0N
xwi1cZpzMsa2bXGL8AVALTCJFRRd3Z3Vj2HjAFbX7ww7bW+/rl14+oDpShWMbW3O
SJpk0TYNYOQVMuEBySEjhOO9JqWQ7B8CBGKPjp6JNwdvUmW6KFA6zlj82fnDAvjp
rtFtrjSCXtdacdlfhNn/cIuaYRFUAp0qFDYCXTftv+E0LzOKouz/LbH5zhM7Vo/d
8Yp0LGPZhafx3EOUGnfn3BtcQNj3/pDS3Gqbpr8UdtgjnXiLwBukLaNQK09RKz69
0zQmyPmdpNgqZM53TYgQPJvb2A604m5LlEZ18tJv3DHRJYvdvp15BiV/3TH4ca4f
xt70NxmBsjVjmIdUZhnrdLkm5psb8+eXWH1eyTVZhmIhYZyAuNm1DMIsCNXh5fjq
wFpEhr+5FpKNAx2CvKyY65cjUIczhfibppnxZtyStsNRkxqVVjFYiCCI5Tf1bNmi
rtr9WCVeCtZJuBRjnmsMBjvhZeCtJEXkFkxdudkXT5JjClC/oVzFSrQhy9TM25kg
Lr87sWGZ3PVA8aqtrjft0374+b+n95N/wR0S76zO57xI0bSUY4jnzBiIGLUsFM6l
+HdJXdT+rG5GFa7nGbLb
=53Ez
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.