From: eldy <> Date: Mon, 14 Jun 2004 23:45:33 +0000 (+0000) Subject: no message X-Git-Tag: AWSTATS_6_2_BETA~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8b6d602a047acb1858709cbcbef4e515d7a4c24;p=thirdparty%2FAWStats.git no message --- diff --git a/tools/webmin/awstats/schedule_stats.cgi b/tools/webmin/awstats/schedule_stats.cgi index dcb719e2..2136efc0 100644 --- a/tools/webmin/awstats/schedule_stats.cgi +++ b/tools/webmin/awstats/schedule_stats.cgi @@ -37,21 +37,52 @@ print "
\n"; # For global update print "\n"; -print "\n"; -print "\n"; -print "\n"; print "
"; +print "
"; print "Scheduled AWStats global update process (For all files in /etc/awstats)"; print "
None  
Yes "; - -print "\n"; -# Show cron found -print "\n"; -# Loop on each logrotate found -print "\n"; -print "\n"; -print "\n"; -print "
By cron Date: NA Remove this order
By logrotate preprocess File: NA Remove this order
Add a new global update order by cron
Add a new global update order by a logrotate file
"; +print "
"; + +if ( foreign_installed('cron', 0) || foreign_installed('logrotate', 0) ) { + print "\n"; + # Show cron found + if ( foreign_installed('cron', 0) ) { + $idcron=0; + @jobs = &foreign_call("cron","list_cron_jobs"); + + #TODO detect idcron for /.*/awstats_updateall.pl in @jobs + + print "\n"; + } + # Loop on each logrotate found + if ( foreign_installed('logrotate', 0) ) { + print " "; + + print " "; + print " "; + } + print "
By cron "; + if (! $idcron) { + print "Off\n"; + } + else { + print "On\n"; + } + print " "; + if (! $idcron) { + print "Add AWStats global update process in cron\n"; + } else { + print "Edit cron task to update all AWStats config files "; + } + print "
By logrotate preprocess File: NA Edit logrotate file
"; + + print "Add a logrotate for this file"; + + print "
"; +} +else { + print "Nor cron, nor logrotate module are installed. They are required to setup AWStats scheduled tasks"; +} print "
"; @@ -62,21 +93,51 @@ print "
\n"; # For particular config file update print "\n"; -print "\n"; -print "\n"; -print "\n"; print "
"; +print "
"; print "Scheduled AWStats update process for this config file only (".$in{'file'}.")"; print "
None  
Yes "; - -print "\n"; -# Show cron found -print "\n"; -# Loop on each logrotate found -print "\n"; -print "\n"; -print "\n"; -print "
By cron Date: NA Remove this order
By logrotate preprocess File: NA Remove this order
Add a new global update order by cron
Add a new global update order by a logrotate file
"; +print "
"; + +if ( foreign_installed('cron', 0) || foreign_installed('logrotate', 0) ) { + print "\n"; + # Show cron found + if ( foreign_installed('cron', 0) ) { + @jobs = &foreign_call("cron","list_cron_jobs"); + + #TODO detect idcron for /.*/awstats_updateall.pl in @jobs + + print "\n"; + } + # Loop on each logrotate found + if ( foreign_installed('logrotate', 0) ) { + print " "; + print " "; + print " "; + + } + print "
By cron "; + if (! $idcron) { + print "Off\n"; + } + else { + print "On\n"; + } + print " "; + if (! $idcron) { + print "Add AWStats update process in cron for config file\n"; + } else { + print "Edit cron task to update only this AWStats config files "; + } + print "
By logrotate preprocess File: NA Edit logrotate file
"; + + print "Add a logrotate for this file"; + + print "
"; +} +else { + print "Nor cron, nor logrotate module are installed. They are required to setup AWStats scheduled tasks"; +} print "
";