[Fusionforge-commits] r7196 - trunk/gforge/cron.d

Christian Bayle cbayle at libremir.placard.fr.eu.org
Thu Mar 19 18:08:05 CET 2009


Author: cbayle
Date: 2009-03-19 18:08:04 +0100 (Thu, 19 Mar 2009)
New Revision: 7196

Added:
   trunk/gforge/cron.d/00phpcron
   trunk/gforge/cron.d/Makefile
   trunk/gforge/cron.d/backup1
   trunk/gforge/cron.d/backup2
   trunk/gforge/cron.d/db-postgresql
   trunk/gforge/cron.d/db-postgresql-2
   trunk/gforge/cron.d/dns-bind9
   trunk/gforge/cron.d/ftp-proftpd
   trunk/gforge/cron.d/homedirs
   trunk/gforge/cron.d/lists-mailman
   trunk/gforge/cron.d/mail
   trunk/gforge/cron.d/plugin-scmcvs
   trunk/gforge/cron.d/plugin-scmsvn
   trunk/gforge/cron.d/shell-postgresql
   trunk/gforge/cron.d/web-apache2
Modified:
   trunk/gforge/cron.d/fusionforge
Log:
Preliminary work to merge debian and redhat cron


Added: trunk/gforge/cron.d/00phpcron
===================================================================
--- trunk/gforge/cron.d/00phpcron	                        (rev 0)
+++ trunk/gforge/cron.d/00phpcron	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,12 @@
+FFCRON="/usr/share/gforge/cronjobs"
+FFUSER=gforge
+
+# Change paths to the GForge directory.
+# Don't reference $GFORGE because this won't work!
+# You may need to change the pathname to php CLI (command line interface)
+#INCLUDE_PATH=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
+PHP="/usr/bin/php -q -d include_path=.:/etc/gforge:/usr/share/gforge:/usr/share/gforge/www/include"
+
+# Don't mail command output to anyone.
+MAILTO=""
+

Added: trunk/gforge/cron.d/Makefile
===================================================================
--- trunk/gforge/cron.d/Makefile	                        (rev 0)
+++ trunk/gforge/cron.d/Makefile	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,6 @@
+
+fusionforge: 00phpcron db-postgresql backup1 homedirs mail
+	echo "# THIS FILE IS GENERATED, PLEASE DON'T EDIT, RATHER USE Makefile" > fusionforge
+	cat 00phpcron db-postgresql backup1 homedirs mail >> fusionforge
+clean:
+	rm fusionforge

Added: trunk/gforge/cron.d/backup1
===================================================================
--- trunk/gforge/cron.d/backup1	                        (rev 0)
+++ trunk/gforge/cron.d/backup1	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,3 @@
+# Daily site backup
+0 2 * * *  root $PHP $FFCRON/backup_site.php
+

Added: trunk/gforge/cron.d/backup2
===================================================================
--- trunk/gforge/cron.d/backup2	                        (rev 0)
+++ trunk/gforge/cron.d/backup2	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,4 @@
+# Daily incremental backup to /backup
+# we have to discuss this 
+#15 23 * * * root $FFCRON/gforge-db-backup.sh
+

Added: trunk/gforge/cron.d/db-postgresql
===================================================================
--- trunk/gforge/cron.d/db-postgresql	                        (rev 0)
+++ trunk/gforge/cron.d/db-postgresql	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,46 @@
+#
+# Regular cron jobs for the db-postgresql package
+#
+
+# Daily reporting process
+25 7 * * * $FFUSER $PHP $FFCRON/reporting_cron.php
+
+# Recalculate user popularity metric
+25 1 * * * $FFUSER $PHP $FFCRON/calculate_user_metric.php
+
+# Daily recalculate of the sums under the trove map
+30 1 * * * $FFUSER $PHP $FFCRON/db_trove_maint.php
+
+# Daily deletion of sessions, closing jobs, etc
+35 1 * * * $FFUSER $PHP $FFCRON/project_cleanup.php
+
+# Daily crunching of survey data and other associated ratings
+40 1 * * * $FFUSER $PHP $FFCRON/rating_stats.php
+
+# Daily crunching of project summary data (counts)
+42 1 * * * $FFUSER $PHP $FFCRON/db_project_sums.php
+
+# Daily close pending artifacts
+43 1 * * * $FFUSER $PHP $FFCRON/check_stale_tracker_items.php
+
+# Daily project_weekly_metric recalc
+12 1 * * * $FFUSER $PHP $FFCRON/project_weekly_metric.php
+
+# Daily rotation of the activity_log
+0 0 * * * $FFUSER $PHP $FFCRON/rotate_activity.php
+
+# Daily aggregating of the numbers
+15 0 * * * $FFUSER $PHP $FFCRON/site_stats.php
+
+# Daily sweep of the stats into final tables
+45 0 * * * $FFUSER $PHP $FFCRON/db_stats_agg.php
+
+# Hourly send pending massmailings, if any
+48 * * * * root $PHP $FFCRON/massmail.php
+
+# Weekly db vacuum (should be done after ALL OTHER JOBS)
+50 2 * * Mon $FFUSER $PHP $FFCRON/vacuum.php
+
+# Create SCM repositories
+0 * * * * root $PHP $FFCRON/create_scm_repos.php
+

Added: trunk/gforge/cron.d/db-postgresql-2
===================================================================
--- trunk/gforge/cron.d/db-postgresql-2	                        (rev 0)
+++ trunk/gforge/cron.d/db-postgresql-2	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,6 @@
+# Daily sweep of the HTTP log files for project activity
+15 0 * * * $FFUSER $FFCRON/stats_projects_logparse.pl
+
+# Daily mail for not approved news
+30 17 * * * root $FFCRON/get_news_notapproved.pl
+

Added: trunk/gforge/cron.d/dns-bind9
===================================================================
--- trunk/gforge/cron.d/dns-bind9	                        (rev 0)
+++ trunk/gforge/cron.d/dns-bind9	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,6 @@
+#
+# Regular cron jobs for the dns-bind9 package
+#
+
+# DNS Update
+0 * * * * root [ -f /var/lib/gforge/bind/dns.head ] && [ -x /usr/lib/gforge/bin/dns_conf.pl ] && /usr/lib/gforge/bin/dns_conf.pl &&  /usr/sbin/invoke-rc.d --quiet bind9 reload 

Added: trunk/gforge/cron.d/ftp-proftpd
===================================================================
--- trunk/gforge/cron.d/ftp-proftpd	                        (rev 0)
+++ trunk/gforge/cron.d/ftp-proftpd	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,11 @@
+#
+# Regular cron jobs for the ftp-proftpd package
+#
+
+INCLUDE_PATH=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
+
+# FTP update
+0 * * * * root [ -x /usr/lib/gforge/bin/install-ftp.sh ] && /usr/lib/gforge/bin/install-ftp.sh update > /dev/null 2>&1
+
+# create and mount project directory in user's home directory
+0 * * * * root [ -x /usr/lib/gforge/bin/ftp_create_group_access.php ] && /usr/bin/php5 -d include_path=$INCLUDE_PATH /usr/lib/gforge/bin/ftp_create_group_access.php > /dev/null 2>&1

Modified: trunk/gforge/cron.d/fusionforge
===================================================================
--- trunk/gforge/cron.d/fusionforge	2009-03-19 14:53:13 UTC (rev 7195)
+++ trunk/gforge/cron.d/fusionforge	2009-03-19 17:08:04 UTC (rev 7196)
@@ -1,115 +1,78 @@
-#
-# GForge
-# Copyright 1999-2001 (c) VA Linux Systems
-# Copyright 2002-2004 (c) GForge, LLC, Ognyan Kulev
-# http://gforge.org/
-#
+# THIS FILE IS GENERATED, PLEASE DON'T EDIT, RATHER USE Makefile
+FFCRON="/usr/share/gforge/cronjobs"
+FFUSER=gforge
 
-# Change path to the GForge directory.
-FUSIONFORGE="/usr/share/gforge"
-
 # Change paths to the GForge directory.
 # Don't reference $GFORGE because this won't work!
 # You may need to change the pathname to php CLI (command line interface)
+#INCLUDE_PATH=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
 PHP="/usr/bin/php -q -d include_path=.:/etc/gforge:/usr/share/gforge:/usr/share/gforge/www/include"
 
 # Don't mail command output to anyone.
 MAILTO=""
 
 #
-#       recalculate user popularity metric
+# Regular cron jobs for the db-postgresql package
 #
-10 1 * * * gforge $PHP $FUSIONFORGE/cronjobs/calculate_user_metric.php
 
-#
-#  daily project_weekly_metric recalc
-#
-12 1 * * * gforge $PHP $FUSIONFORGE/cronjobs/project_weekly_metric.php
+# Daily reporting process
+25 7 * * * $FFUSER $PHP $FFCRON/reporting_cron.php
 
-#
-#   daily deletion of sessions, closing jobs, etc
-#
-15 1 * * * gforge $PHP $FUSIONFORGE/cronjobs/project_cleanup.php
+# Recalculate user popularity metric
+25 1 * * * $FFUSER $PHP $FFCRON/calculate_user_metric.php
 
-#
-#  daily crunching of survey data and other associated ratings
-#
-41 1 * * * gforge $PHP $FUSIONFORGE/cronjobs/rating_stats.php
+# Daily recalculate of the sums under the trove map
+30 1 * * * $FFUSER $PHP $FFCRON/db_trove_maint.php
 
-#
-#  daily crunching of project summary data (counts)
-#
-45 1 * * * gforge $PHP $FUSIONFORGE/cronjobs/db_project_sums.php
+# Daily deletion of sessions, closing jobs, etc
+35 1 * * * $FFUSER $PHP $FFCRON/project_cleanup.php
 
-#
-#   daily recalculate of the sums under the trove map
-#
-50 1 * * * gforge $PHP $FUSIONFORGE/cronjobs/db_trove_maint.php
+# Daily crunching of survey data and other associated ratings
+40 1 * * * $FFUSER $PHP $FFCRON/rating_stats.php
 
-#
-#	daily close pending artifacts
-#
-57 1 * * * gforge $PHP $FUSIONFORGE/cronjobs/check_stale_tracker_items.php
+# Daily crunching of project summary data (counts)
+42 1 * * * $FFUSER $PHP $FFCRON/db_project_sums.php
 
-#
-#      Daily site backup
-#
-0 2 * * *  root $PHP $FUSIONFORGE/cronjobs/backup_site.php
+# Daily close pending artifacts
+43 1 * * * $FFUSER $PHP $FFCRON/check_stale_tracker_items.php
 
+# Daily project_weekly_metric recalc
+12 1 * * * $FFUSER $PHP $FFCRON/project_weekly_metric.php
 
-#
-#       VACUUM should be done after ALL OTHER JOBS
-#
-0 2 * * *  gforge $PHP $FUSIONFORGE/cronjobs/vacuum.php
+# Daily rotation of the activity_log
+0 0 * * * $FFUSER $PHP $FFCRON/rotate_activity.php
 
-#
-#       Stats aggregation work
-#
-15 7 * * * gforge $PHP $FUSIONFORGE/cronjobs/db_stats_agg.php
+# Daily aggregating of the numbers
+15 0 * * * $FFUSER $PHP $FFCRON/site_stats.php
 
-#
-#       daily rotation of the activity_log
-#
-0 0 * * *  gforge $PHP $FUSIONFORGE/cronjobs/rotate_activity.php
+# Daily sweep of the stats into final tables
+45 0 * * * $FFUSER $PHP $FFCRON/db_stats_agg.php
 
-#
-#       daily aggregating of the numbers
-#
-15 0 * * * gforge $PHP $FUSIONFORGE/cronjobs/site_stats.php
-
-#
 # Hourly send pending massmailings, if any
-#
-47 * * * * root $PHP $FUSIONFORGE/cronjobs/massmail.php
+48 * * * * root $PHP $FFCRON/massmail.php
 
-#
-#       Reporting Process
-#
-25 7 * * * gforge $PHP $FUSIONFORGE/cronjobs/reporting_cron.php
+# Weekly db vacuum (should be done after ALL OTHER JOBS)
+50 2 * * Mon $FFUSER $PHP $FFCRON/vacuum.php
 
-#
-#
-#	IMPORTANT!! READ THE README.root file before continuing!
-#
-#
+# Create SCM repositories
+0 * * * * root $PHP $FFCRON/create_scm_repos.php
 
-#
-#       Create the shell users accounts and groups home directories
-#
-15 * * * * root $PHP $FUSIONFORGE/cronjobs/homedirs.php
+# Daily site backup
+0 2 * * *  root $PHP $FFCRON/backup_site.php
 
 #
-#       Create the new mailing lists
+# IMPORTANT!! READ THE README.root file before continuing!
 #
-06 * * * * root $PHP $FUSIONFORGE/cronjobs/mail/mailing_lists_create.php
 
-#
-#       Create the /etc/aliases file
-#
-08 * * * * root $PHP $FUSIONFORGE/cronjobs/mail/mailaliases.php
+# Create the shell users accounts and groups home directories
+15 * * * * root $PHP $FFCRON/homedirs.php
 
-#
-#   Send email to users with pending tasks
-#
-#30 5 * * 1,2,3,4,5 root $PHP $FUSIONFORGE/cronjobs/daily_task_email.php
+# Create the new mailing lists
+06 * * * * root $PHP $FFCRON/mail/mailing_lists_create.php
 
+# Create the /etc/aliases file
+08 * * * * root $PHP $FFCRON/mail/mailaliases.php
+
+# Send email to users with pending tasks
+#30 5 * * 1,2,3,4,5 root $PHP $FFCRON/daily_task_email.php
+

Added: trunk/gforge/cron.d/homedirs
===================================================================
--- trunk/gforge/cron.d/homedirs	                        (rev 0)
+++ trunk/gforge/cron.d/homedirs	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,7 @@
+#
+# IMPORTANT!! READ THE README.root file before continuing!
+#
+
+# Create the shell users accounts and groups home directories
+15 * * * * root $PHP $FFCRON/homedirs.php
+

Added: trunk/gforge/cron.d/lists-mailman
===================================================================
--- trunk/gforge/cron.d/lists-mailman	                        (rev 0)
+++ trunk/gforge/cron.d/lists-mailman	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,6 @@
+#
+# Regular cron jobs for the lists-mailman package
+#
+
+# Mailing-list creation
+55 * * * * root [ -x /usr/lib/gforge/bin/create-mailing-lists.pl ] && /usr/lib/gforge/bin/create-mailing-lists.pl > /dev/null 2>&1

Added: trunk/gforge/cron.d/mail
===================================================================
--- trunk/gforge/cron.d/mail	                        (rev 0)
+++ trunk/gforge/cron.d/mail	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,9 @@
+# Create the new mailing lists
+06 * * * * root $PHP $FFCRON/mail/mailing_lists_create.php
+
+# Create the /etc/aliases file
+08 * * * * root $PHP $FFCRON/mail/mailaliases.php
+
+# Send email to users with pending tasks
+#30 5 * * 1,2,3,4,5 root $PHP $FFCRON/daily_task_email.php
+

Added: trunk/gforge/cron.d/plugin-scmcvs
===================================================================
--- trunk/gforge/cron.d/plugin-scmcvs	                        (rev 0)
+++ trunk/gforge/cron.d/plugin-scmcvs	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,17 @@
+#
+# Regular cron jobs for plugin-scmcvs
+#
+
+INCLUDE_PATH=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
+
+# Tarballs
+5 2 * * * root [ -x /usr/share/gforge/plugins/scmcvs/cronjobs/tarballs.php ] && php -d include_path=$INCLUDE_PATH /usr/share/gforge/plugins/scmcvs/cronjobs/tarballs.php > /dev/null 2>&1
+
+# Snapshots
+35 2 * * * root [ -x /usr/share/gforge/plugins/scmcvs/cronjobs/snapshots.sh ] && /usr/share/gforge/plugins/scmcvs/cronjobs/snapshots.sh generate > /dev/null 2>&1
+
+# Repositories update (.pl in debian)
+5 * * * * root [ -x /usr/share/gforge/plugins/scmcvs/cronjobs/cvs_dump.pl ] && su -s /bin/sh gforge -c /usr/share/gforge/plugins/scmcvs/cronjobs/cvs_dump.pl > /dev/null 2>&1 && [ -x /usr/share/gforge/plugins/scmcvs/cronjobs/cvs_update.pl ] && /usr/share/gforge/plugins/scmcvs/cronjobs/cvs_update.pl > /dev/null 2>&1
+
+# CVS add/commit Statistics
+45 4 * * * root [ -x /usr/share/gforge/plugins/scmcvs/cronjobs/cvs-stats.pl ] && /usr/share/gforge/plugins/scmcvs/cronjobs/cvs-stats.pl > /dev/null 2>&1

Added: trunk/gforge/cron.d/plugin-scmsvn
===================================================================
--- trunk/gforge/cron.d/plugin-scmsvn	                        (rev 0)
+++ trunk/gforge/cron.d/plugin-scmsvn	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,17 @@
+#
+# Regular cron jobs for plugin-scmsvn
+#
+
+INCLUDE_PATH=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
+
+# Tarballs
+5 2 * * * root [ -x /usr/share/gforge/plugins/scmsvn/cronjobs/tarballs.php ] && php -d include_path=$INCLUDE_PATH /usr/share/gforge/plugins/scmsvn/cronjobs/tarballs.php > /dev/null 2>&1
+
+# Snapshots
+35 3 * * * root [ -x /usr/share/gforge/plugins/scmsvn/cronjobs/snapshots.sh ] && /usr/share/gforge/plugins/scmsvn/cronjobs/snapshots.sh generate > /dev/null 2>&1
+
+# Repositories update
+45 * * * * root [ -x /usr/share/gforge/plugins/scmsvn/cronjobs/svn_dump.pl ] && su -s /bin/sh gforge -c /usr/share/gforge/plugins/scmsvn/cronjobs/svn_dump.pl > /dev/null 2>&1 && [ -x /usr/share/gforge/plugins/scmsvn/cronjobs/svn_update.pl ] && /usr/share/gforge/plugins/scmsvn/cronjobs/svn_update.pl > /dev/null 2>&1
+
+# Statistics
+55 4 * * * root [ -x /usr/share/gforge/plugins/scmsvn/cronjobs/svn-stats.php ] && php -d include_path=$INCLUDE_PATH /usr/share/gforge/plugins/scmsvn/cronjobs/svn-stats.php > /dev/null 2>&1

Added: trunk/gforge/cron.d/shell-postgresql
===================================================================
--- trunk/gforge/cron.d/shell-postgresql	                        (rev 0)
+++ trunk/gforge/cron.d/shell-postgresql	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,6 @@
+#
+# Regular cron jobs for shell-postgresql
+#
+
+# SCM/user/group update
+0 * * * * root [ -x /usr/lib/gforge/bin/update-user-group-ssh.sh ] && /usr/lib/gforge/bin/update-user-group-ssh.sh > /dev/null 2>&1

Added: trunk/gforge/cron.d/web-apache2
===================================================================
--- trunk/gforge/cron.d/web-apache2	                        (rev 0)
+++ trunk/gforge/cron.d/web-apache2	2009-03-19 17:08:04 UTC (rev 7196)
@@ -0,0 +1,9 @@
+#
+# Regular cron jobs for the web-apache2 package
+#
+
+# Clean cached files older than 60 minutes
+25 * * * * root [ -d /var/cache/gforge ] && find /var/cache/gforge/ -type f -and -cmin +60 -exec /bin/rm -f "{}" \; > /dev/null 2>&1
+
+# Enable the virtual hosts
+37 7,19 * * * root [ -x /usr/lib/gforge/bin/create-vhosts.sh ] && /usr/lib/gforge/bin/create-vhosts.sh > /dev/null 2>&1




More information about the Fusionforge-commits mailing list