Changeset 1521 for branches/locker-dev


Ignore:
Timestamp:
Mar 26, 2010, 6:21:51 AM (14 years ago)
Author:
mitchb
Message:
Send cronjob mail to the user who signed up a locker by default

Previously, we set up crontabs to send mail to lockername@mit.edu.
This was fine when scripts didn't support non-user lockers.  It's
not necessarily a fine assumption in the case of group lockers that
the address is appropriate (or even exists).  We could send mail
to the scripts user, but that only works if the user is signed up
for mail_scripts.  Instead, we'll default it to the user who signed
the locker up for cron_scripts (the same logic mail_scripts uses
for the initial procmailrc) and tell them to change it if it should
go elsewhere when they set up their crontab.

Also move the crontab template to bin instead of deploy so that it
can be under revision control.  Finally, correct a whitespace error
in the ASCII art (reported by kaduk).
Location:
branches/locker-dev/locker/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/locker-dev/locker/bin/crontab

    r1520 r1521  
    99# (can be useful for debugging)
    1010# You can always redirect the output of individual commands to /dev/null
    11 MAILTO="SCRIPTS_USER@mit.edu"
     11MAILTO="ATHENA_USER@mit.edu"
    1212# If you do not want to receive any mail from cron, use the line below instead
    1313#MAILTO=""
     
    2222#  | | | | |
    2323#  | | | | ----- day of week (0 - 6) (Sunday=0)
    24 #  | |  | ------- month (1 - 12)
     24#  | | | ------- month (1 - 12)
    2525#  | | --------- day of month (1 - 31)
    2626#  | ----------- hour (0 - 23)
  • branches/locker-dev/locker/bin/signup-cron

    r1087 r1521  
    1010  fs sa /mit/$lname/cron_scripts daemon.scripts write
    1111  DATE=`date`
    12   sed '/SCRIPTS_USER/s//'"$lname"'/g' /mit/scripts/deploy/crontab | sed '/SCRIPTS_DATE/s//'"$DATE"'/g' > /mit/$lname/cron_scripts/crontab
     12  signupuser=`echo "$principal" | sed 's/@.*$//'`
     13  sed '/SCRIPTS_USER/s//'"$lname"'/g' /mit/scripts/bin$scriptsdev/crontab | sed '/ATHENA_USER/s//'"$signupuser"'/g' | sed '/SCRIPTS_DATE/s//'"$DATE"'/g' > /mit/$lname/cron_scripts/crontab
     14  echo "By default, output from cron jobs for the $lname locker will be mailed"
     15  echo "to $signupuser@mit.edu.  You should edit /mit/$lname/cron_scripts/crontab"
     16  echo "to change this and set up your cron jobs."
    1317  success "the cron script service" "The directory /mit/$lname/cron_scripts has been created."
    1418else
Note: See TracChangeset for help on using the changeset viewer.