Skip to content

Commit

Permalink
Merge pull request #9 from hman/master
Browse files Browse the repository at this point in the history
Adding support for the zopectl umask paramter
  • Loading branch information
alecghica committed Jul 11, 2013
2 parents f348ca5 + 8c25fe3 commit 1a41792
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES.txt
Expand Up @@ -4,7 +4,8 @@ Changelog
4.2.13 (unreleased)
-------------------

- nothing changed
- adding support for zopectl umask
[hman]


4.2.12 (2013-06-04)
Expand Down
7 changes: 7 additions & 0 deletions README.rst
Expand Up @@ -447,6 +447,13 @@ zope-conf-additional
locale fr_FR
http-realm Slipknot

zopectl-umask
Manually set the umask for the zopectl process

Example::

zopectl-umask = 002

Additional Control Script `debug` and `run` Commands
----------------------------------------------------

Expand Down
10 changes: 8 additions & 2 deletions src/plone/recipe/zope2instance/__init__.py
Expand Up @@ -571,12 +571,18 @@ def install_scripts(self):
zope_conf = os.path.join(location, 'etc', 'zope.conf')
zope_conf_path = options.get('zope-conf', zope_conf)

zopectl_umask = options.get('zopectl-umask', '')

extra_paths = options.get('extra-paths', '').split()
requirements, ws = self.egg.working_set(['plone.recipe.zope2instance'])
reqs = [(self.options.get('control-script', self.name),
'plone.recipe.zope2instance.ctl', 'main')]
script_arguments = ('\n ["-C", %r]'
'\n + sys.argv[1:]' % zope_conf_path)

arguments = ["-C", zope_conf_path]
if zopectl_umask:
arguments.extend(["--umask", int(zopectl_umask, 8)])
script_arguments = ('\n ' + repr(arguments) +
'\n + sys.argv[1:]')

generated = self._install_scripts(
options['bin-directory'], ws, reqs=reqs, extra_paths=extra_paths,
Expand Down

0 comments on commit 1a41792

Please sign in to comment.