Commit 6f009a9f authored by Julien Muchembled's avatar Julien Muchembled

NEO: do not rely on $HOME, which is not always equal to ${buildout:directory}

By default, this is only true when a partition has a dedicated unix user.
Inside a webrunner, we can have:
  ${buildout:directory} = /srv/slapgrid/slappart0/srv/runner/instance/slappart1
  but $HOME = /srv/slapgrid/slappart0

Zope partitions override HOME as follows:
  home-path = ${buildout:directory}
parent 42701729
......@@ -24,6 +24,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
from slapos.recipe.librecipe import GenericBaseRecipe
from zc.buildout import UserError
......@@ -51,10 +52,11 @@ class NeoBaseRecipe(GenericBaseRecipe):
'-c', options['cluster'],
]
if options['ssl']:
etc = os.path.join(self.buildout['buildout']['directory'], 'etc', '')
option_list += (
'--ca', '~/etc/ca.crt',
'--cert', '~/etc/neo.crt',
'--key', '~/etc/neo.key',
'--ca', etc + 'ca.crt',
'--cert', etc + 'neo.crt',
'--key', etc + 'neo.key',
)
option_list.extend(self._getOptionList())
return [self.createPythonScript(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment