Ticket #990 (closed Patches: fixed)

Opened 3 years ago

Last modified 2 years ago

Strip comment from backup crontab

Reported by: webrainstorm Assigned to:
Priority: minor Milestone: 2.2
Component: Backup & Restore Version: 2.1
Keywords: backup crontab Cc:
Confirmation: SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

Some version of crontab output some lines of comments when invoked with the list option

$/usr/bin/crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.XXXXFtlCcT installed on Thu Jun 29 10:39:29 2006) # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)

Line 79 and 91 of /var/lib/asterisk/bin/retrieve_backup_cron_from_mysql.pl should be changed to:

system ("/usr/bin/crontab -l | grep -v ^# | grep -v ampbackup.pl  >> $Backup_cron ");

this avoid comments to be appended each time a backup set is added, deleted or modified

Hope it helps

Edoardo

Change History

09/07/06 03:28:09 changed by RobThomas

  • status changed from new to closed.
  • resolution set to fixed.

Applied in r2299 - Thanks!

--Rob

09/07/06 03:29:50 changed by RobThomas

(and r2300, too)

01/08/07 11:46:44 changed by

  • milestone deleted.

Milestone 2.2 deleted

01/08/07 13:11:35 changed by vgster

  • milestone set to 2.2.