[Checkins] SVN: zc.zodbrecipes/trunk/ Bug Fixed: crontab and logrotate configuration files were being

Jim Fulton jim at zope.com
Mon Apr 23 14:36:04 EDT 2007


Log message for revision 74686:
  Bug Fixed: crontab and logrotate configuration files were being
             generates incorrectly.
  

Changed:
  U   zc.zodbrecipes/trunk/README.txt
  U   zc.zodbrecipes/trunk/setup.py
  U   zc.zodbrecipes/trunk/zc/zodbrecipes/__init__.py
  U   zc.zodbrecipes/trunk/zc/zodbrecipes/zeo.txt

-=-
Modified: zc.zodbrecipes/trunk/README.txt
===================================================================
--- zc.zodbrecipes/trunk/README.txt	2007-04-23 16:52:34 UTC (rev 74685)
+++ zc.zodbrecipes/trunk/README.txt	2007-04-23 18:36:03 UTC (rev 74686)
@@ -7,6 +7,14 @@
 Changes
 *******
 
+0.2.1 (2007-04-23)
+================
+
+Bugs Fixed
+----------
+
+- crontab and logrotate configuration files were being generates incorrectly.
+
 0.2 (2007-04-17)
 ================
 

Modified: zc.zodbrecipes/trunk/setup.py
===================================================================
--- zc.zodbrecipes/trunk/setup.py	2007-04-23 16:52:34 UTC (rev 74685)
+++ zc.zodbrecipes/trunk/setup.py	2007-04-23 18:36:03 UTC (rev 74686)
@@ -21,7 +21,7 @@
 name = "zc.zodbrecipes"
 setup(
     name = name,
-    version = "0.2",
+    version = "0.2.1",
     author = "Jim Fulton",
     author_email = "jim at zope.com",
     description = "ZC Buildout recipes for ZODB",

Modified: zc.zodbrecipes/trunk/zc/zodbrecipes/__init__.py
===================================================================
--- zc.zodbrecipes/trunk/zc/zodbrecipes/__init__.py	2007-04-23 16:52:34 UTC (rev 74685)
+++ zc.zodbrecipes/trunk/zc/zodbrecipes/__init__.py	2007-04-23 18:36:03 UTC (rev 74686)
@@ -79,7 +79,8 @@
             logrotate = options['logrotate']
             open(logrotate, 'w').write(logrotate_template % dict(
                 logfile=event_log_path,
-                rc=rc,
+                rc=os.path.join(options['rc-directory'], rc),
+                conf=zdaemon_conf_path,
                 ))
             
             creating = [zeo_conf_path, zdaemon_conf_path, logrotate,
@@ -207,10 +208,10 @@
                 else:
                     days = 1
                 for storage in storages:
-                    f.write("%s %s %s -S %s -d %s\n" % (
-                            ' '.join(pack),
-                            options['zeopack'],
-                            address, storage, days))
+                    f.write("%s %s %s %s -S %s -d %s\n" % (
+                            ' '.join(pack), options['user'],
+                            options['zeopack'], address, storage, days,
+                            ))
                 f.close()
 
             return creating
@@ -259,7 +260,7 @@
   rotate 5
   weekly
   postrotate
-    %(rc)s reopen_transcript
+    %(rc)s -C %(conf)s reopen_transcript
   endscript
 }
 """

Modified: zc.zodbrecipes/trunk/zc/zodbrecipes/zeo.txt
===================================================================
--- zc.zodbrecipes/trunk/zc/zodbrecipes/zeo.txt	2007-04-23 16:52:34 UTC (rev 74685)
+++ zc.zodbrecipes/trunk/zc/zodbrecipes/zeo.txt	2007-04-23 18:36:03 UTC (rev 74686)
@@ -339,7 +339,7 @@
       rotate 5
       weekly
       postrotate
-        demo-server reopen_transcript
+        /sample-buildout/rc/demo-server -C /sample-buildout/etc/server-zdaemon.conf reopen_transcript
       endscript
     }
 
@@ -420,7 +420,7 @@
 Now, we'll get a crontab file:
 
     >>> cat(cron, 'pack-demo-server')
-    1 1 * * 0 /sample-buildout/bin/zeopack -p 8100 -S main -d 3
+    1 1 * * 0 bob /sample-buildout/bin/zeopack -p 8100 -S main -d 3
 
 In this example, we'll pack the databases every Sunday at 1:01 to 3
 days.



More information about the Checkins mailing list