For api.aegirproject.org, we have an entry in aegir's crontab that runs a bash script to git pull the various repos, and then calls cron on the site, so that api.module picks up any changes.

On upgrades of Aegir, crontab is re-written, and so this additional entry is lost. Is there any way to make these entries persist across upgrades?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anarcat’s picture

Title: Keep additional crontab entries for the aegir user » Non-destructive aegir user crontab edition
Component: Documentation » Code
Category: support » feature

That is a great idea! We could have special markers in the crontab text to mark the automatically managed entries, a bit like what Puppet does... and only edit the entries within those markers.

Steven Jones’s picture

Version: 6.x-1.2 » 6.x-2.x-dev
Priority: Normal » Major
ergonlogic’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Issue summary: View changes

New features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x.

omega8cc’s picture

Why not to simply use /etc/crontab for custom entries you don't want to get overwritten?

helmo’s picture

The Debian package could easily handle a static cron file.

The code where we generate the contents for the crontab entry, however is now in the hosting package. In the 'hosting-setup' drush command.

And I don't want to do that in two places.

Letting Aegir edit a file in /etc/cron.d is not so nice in terms of security ... So the best option I see is to create some php code that can safely remove our old cron lines.

helmo’s picture

helmo’s picture

Component: Code » Install process
Status: Active » Needs review
FileSize
1.9 KB

And with some more documentation.

This should remove our old lines, and add the new ones at the bottom.

helmo’s picture

Issue tags: +Aegir 3.2
gboudrias’s picture

Status: Needs review » Reviewed & tested by the community

Seems to work pretty well.

helmo’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.