source: branches/locker-dev/locker/bin/signup-cron @ 2074

Last change on this file since 2074 was 1534, checked in by mitchb, 13 years ago
Make procmail and cron try harder to actually mail the signup user At present, we try to set up the initial crontab or procmailrc to send mail to the user who signed a locker up for the cron or mail service by stripping off the @REALM from the Kerberos principal. We need to also strip non-null instances off to get the username. (If you're doing signups for lockers using machine or service principals, you ought to be able to fend for yourself.)
  • Property svn:executable set to *
File size: 981 bytes
[1087]3attach -q scripts
[127]4. /mit/scripts/bin$scriptsdev/signup-minimal
6if [ ! -d "/mit/$lname/cron_scripts/" ]; then
[660]7  mkdir -p /mit/$lname/cron_scripts
[127]8  fs sa /mit/$lname/cron_scripts system:anyuser l
[380]9  fs sa /mit/$lname/cron_scripts system:authuser none
[127]10  fs sa /mit/$lname/cron_scripts daemon.scripts write
11  DATE=`date`
[1534]12  signupuser=`echo "$principal" | sed 's/[/@].*$//'`
[1521]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 $  You should edit /mit/$lname/cron_scripts/crontab"
16  echo "to change this and set up your cron jobs."
[127]17  success "the cron script service" "The directory /mit/$lname/cron_scripts has been created."
19  success "the cron script service" "The directory /mit/$lname/cron_scripts already exists." 
Note: See TracBrowser for help on using the repository browser.