add user to crontab instructions
PATCH 1/1 add user to crontab instructions
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
Signature · 2 lines
Chris Knadle [email protected]
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
src/mlmmj-make-ml +5 -3
@@ -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
README +4 -4
@@ -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