Skip to content

Commit

Permalink
be able to set server as read only
Browse files Browse the repository at this point in the history
  • Loading branch information
vangheem committed May 30, 2013
1 parent 3fce980 commit 2498880
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Changelog
1.2.6 (unreleased)
------------------

- Nothing changed yet.
- add support for setting zeoserver as read only
[vangheem]

- Add integration with ZRS
[vangheem]


1.2.5 (2013-05-23)
Expand Down
4 changes: 4 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ pack-password
If the ZEO server uses authentication, this is the password used by the
zeopack script to connect to the ZEO server.


ZRS
---

Expand Down Expand Up @@ -213,6 +214,9 @@ relative-paths
Set this to `true` to make the generated scripts use relative
paths. You can also enable this in the `[buildout]` section.

read-only
Set zeoserver to run in read-only mode


Usage
-----
Expand Down
4 changes: 3 additions & 1 deletion src/plone/recipe/zeoserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def build_zeo_conf(self):
replicate=replicate
)

read_only = options.get('read-only', 'false')
zeo_conf = zeo_conf_template % dict(
instance_home = instance_home,
effective_user = effective_user,
Expand All @@ -256,6 +257,7 @@ def build_zeo_conf(self):
zeo_conf_additional = zeo_conf_additional,
monitor_address = monitor_address,
zeo_log_level = zeo_log_level,
read_only = read_only
)

zeo_conf_path = os.path.join(location, 'etc', 'zeo.conf')
Expand Down Expand Up @@ -531,7 +533,7 @@ def _write_file(self, path, content):
<zeo>
address %(zeo_address)s
read-only false
read-only %(read_only)s
invalidation-queue-size %(invalidation_queue_size)s
pid-filename %(pid_file)s
%(authentication)s
Expand Down

0 comments on commit 2498880

Please sign in to comment.