zope2 service... indentation fix
This commit is contained in:
parent
1fc7d6ddb2
commit
af0e2ccf45
|
@ -37,14 +37,14 @@ let
|
||||||
default =
|
default =
|
||||||
''
|
''
|
||||||
<zodb_db main>
|
<zodb_db main>
|
||||||
mount-point /
|
mount-point /
|
||||||
cache-size 30000
|
cache-size 30000
|
||||||
<blobstorage>
|
<blobstorage>
|
||||||
blob-dir /var/lib/zope2/${name}/blobstorage
|
blob-dir /var/lib/zope2/${name}/blobstorage
|
||||||
<filestorage>
|
<filestorage>
|
||||||
path /var/lib/zope2/${name}/filestorage/Data.fs
|
path /var/lib/zope2/${name}/filestorage/Data.fs
|
||||||
</filestorage>
|
</filestorage>
|
||||||
</blobstorage>
|
</blobstorage>
|
||||||
</zodb_db>
|
</zodb_db>
|
||||||
'';
|
'';
|
||||||
type = types.string;
|
type = types.string;
|
||||||
|
@ -76,14 +76,14 @@ in
|
||||||
extra =
|
extra =
|
||||||
''
|
''
|
||||||
<zodb_db main>
|
<zodb_db main>
|
||||||
mount-point /
|
mount-point /
|
||||||
cache-size 30000
|
cache-size 30000
|
||||||
<blobstorage>
|
<blobstorage>
|
||||||
blob-dir /var/lib/zope2/plone01/blobstorage
|
blob-dir /var/lib/zope2/plone01/blobstorage
|
||||||
<filestorage>
|
<filestorage>
|
||||||
path /var/lib/zope2/plone01/filestorage/Data.fs
|
path /var/lib/zope2/plone01/filestorage/Data.fs
|
||||||
</filestorage>
|
</filestorage>
|
||||||
</blobstorage>
|
</blobstorage>
|
||||||
</zodb_db>
|
</zodb_db>
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -107,32 +107,32 @@ in
|
||||||
let
|
let
|
||||||
interpreter = pkgs.writeScript "interpreter"
|
interpreter = pkgs.writeScript "interpreter"
|
||||||
''
|
''
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
_interactive = True
|
_interactive = True
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
_options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
|
_options, _args = __import__("getopt").getopt(sys.argv[1:], 'ic:m:')
|
||||||
_interactive = False
|
_interactive = False
|
||||||
for (_opt, _val) in _options:
|
for (_opt, _val) in _options:
|
||||||
if _opt == '-i':
|
if _opt == '-i':
|
||||||
_interactive = True
|
_interactive = True
|
||||||
elif _opt == '-c':
|
elif _opt == '-c':
|
||||||
exec _val
|
exec _val
|
||||||
elif _opt == '-m':
|
elif _opt == '-m':
|
||||||
sys.argv[1:] = _args
|
sys.argv[1:] = _args
|
||||||
_args = []
|
_args = []
|
||||||
__import__("runpy").run_module(
|
__import__("runpy").run_module(
|
||||||
_val, {}, "__main__", alter_sys=True)
|
_val, {}, "__main__", alter_sys=True)
|
||||||
|
|
||||||
if _args:
|
if _args:
|
||||||
sys.argv[:] = _args
|
sys.argv[:] = _args
|
||||||
__file__ = _args[0]
|
__file__ = _args[0]
|
||||||
del _options, _args
|
del _options, _args
|
||||||
execfile(__file__)
|
execfile(__file__)
|
||||||
|
|
||||||
if _interactive:
|
if _interactive:
|
||||||
del _interactive
|
del _interactive
|
||||||
__import__("code").interact(banner="", local=globals())
|
__import__("code").interact(banner="", local=globals())
|
||||||
'';
|
'';
|
||||||
env = pkgs.buildEnv {
|
env = pkgs.buildEnv {
|
||||||
name = "zope2-${name}-env";
|
name = "zope2-${name}-env";
|
||||||
|
@ -149,73 +149,76 @@ if _interactive:
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
conf = pkgs.writeText "zope2-${name}-conf"
|
conf = pkgs.writeText "zope2-${name}-conf"
|
||||||
''%define INSTANCEHOME ${env}
|
''
|
||||||
instancehome $INSTANCEHOME
|
%define INSTANCEHOME ${env}
|
||||||
%define CLIENTHOME /var/lib/zope2/${name}
|
instancehome $INSTANCEHOME
|
||||||
clienthome $CLIENTHOME
|
%define CLIENTHOME /var/lib/zope2/${name}
|
||||||
|
clienthome $CLIENTHOME
|
||||||
|
|
||||||
debug-mode off
|
debug-mode off
|
||||||
security-policy-implementation C
|
security-policy-implementation C
|
||||||
verbose-security off
|
verbose-security off
|
||||||
default-zpublisher-encoding utf-8
|
default-zpublisher-encoding utf-8
|
||||||
zserver-threads ${toString opts.threads}
|
zserver-threads ${toString opts.threads}
|
||||||
effective-user ${opts.user}
|
effective-user ${opts.user}
|
||||||
|
|
||||||
pid-filename /var/lib/zope2/${name}/pid
|
pid-filename /var/lib/zope2/${name}/pid
|
||||||
lock-filename /var/lib/zope2/${name}/lock
|
lock-filename /var/lib/zope2/${name}/lock
|
||||||
python-check-interval 1000
|
python-check-interval 1000
|
||||||
enable-product-installation off
|
enable-product-installation off
|
||||||
|
|
||||||
<environment>
|
<environment>
|
||||||
zope_i18n_compile_mo_files false
|
zope_i18n_compile_mo_files false
|
||||||
</environment>
|
</environment>
|
||||||
|
|
||||||
<eventlog>
|
<eventlog>
|
||||||
level INFO
|
level INFO
|
||||||
<logfile>
|
<logfile>
|
||||||
path /var/log/zope2/${name}.log
|
path /var/log/zope2/${name}.log
|
||||||
level INFO
|
level INFO
|
||||||
</logfile>
|
</logfile>
|
||||||
</eventlog>
|
</eventlog>
|
||||||
|
|
||||||
<logger access>
|
<logger access>
|
||||||
level WARN
|
level WARN
|
||||||
<logfile>
|
<logfile>
|
||||||
path /var/log/zope2/${name}-Z2.log
|
path /var/log/zope2/${name}-Z2.log
|
||||||
format %(message)s
|
format %(message)s
|
||||||
</logfile>
|
</logfile>
|
||||||
</logger>
|
</logger>
|
||||||
|
|
||||||
<http-server>
|
<http-server>
|
||||||
address ${opts.http_address}
|
address ${opts.http_address}
|
||||||
</http-server>
|
</http-server>
|
||||||
|
|
||||||
<zodb_db temporary>
|
<zodb_db temporary>
|
||||||
<temporarystorage>
|
<temporarystorage>
|
||||||
name temporary storage for sessioning
|
name temporary storage for sessioning
|
||||||
</temporarystorage>
|
</temporarystorage>
|
||||||
mount-point /temp_folder
|
mount-point /temp_folder
|
||||||
container-class Products.TemporaryFolder.TemporaryContainer
|
container-class Products.TemporaryFolder.TemporaryContainer
|
||||||
</zodb_db>
|
</zodb_db>
|
||||||
|
|
||||||
${opts.extra}
|
${opts.extra}
|
||||||
'';
|
'';
|
||||||
ctlScript = pkgs.writeScript "zope2-${name}-ctl-script"
|
ctlScript = pkgs.writeScript "zope2-${name}-ctl-script"
|
||||||
''#!${env}/bin/python
|
''
|
||||||
|
#!${env}/bin/python
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import plone.recipe.zope2instance.ctl
|
import plone.recipe.zope2instance.ctl
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(plone.recipe.zope2instance.ctl.main(
|
sys.exit(plone.recipe.zope2instance.ctl.main(
|
||||||
["-C", "${conf}"]
|
["-C", "${conf}"]
|
||||||
+ sys.argv[1:]))
|
+ sys.argv[1:]))
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ctl = pkgs.writeScript "zope2-${name}-ctl"
|
ctl = pkgs.writeScript "zope2-${name}-ctl"
|
||||||
''#!${pkgs.bash}/bin/bash -e
|
''
|
||||||
export PYTHONHOME=${env}
|
#!${pkgs.bash}/bin/bash -e
|
||||||
exec ${ctlScript} "$@"
|
export PYTHONHOME=${env}
|
||||||
|
exec ${ctlScript} "$@"
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
description = "zope2 ${name} instance";
|
description = "zope2 ${name} instance";
|
||||||
|
|
Loading…
Reference in a new issue