Changeset 2299

Show
Ignore:
Timestamp:
09/07/06 03:29:39 (4 years ago)
Author:
qldrob
Message:

Apply patch #990 - Avoid duplication of generated crontab lines

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/bin/retrieve_backup_cron_from_mysql.pl

    r2086 r2299  
    6666  print "No Backup Schedules defined in $table_name\n"; 
    6767  #grab any other cronjobs that are running as asterisk and NOT associated with backups 
    68         system ("/usr/bin/crontab -l | grep -v ampbackup.pl  >> $Backup_cron "); 
     68        system ("/usr/bin/crontab -l | grep -v ^#\ DO\ NOT | grep -v ^#\ \(/ |  grep -v ampbackup.pl  >> $Backup_cron "); 
    6969        #issue the schedule to the cron scheduler 
    7070        system ("/usr/bin/crontab $Backup_cron"); 
     
    7878} 
    7979        #grab any other cronjobs that are running as asterisk and NOT associated with backups 
    80         system ("/usr/bin/crontab -l | grep -v ampbackup.pl  >> $Backup_cron "); 
     80        system ("/usr/bin/crontab -l | grep -v ^#\ DO\ NOT | grep -v ^#\ \(/ |  grep -v ampbackup.pl  >> $Backup_cron "); 
    8181        #issue the schedule to the cron scheduler 
    8282        system ("/usr/bin/crontab $Backup_cron");