Commit f59812a4 authored by Fred Drake's avatar Fred Drake

Always define INSTANCE in the generated files and refer to that, to

make it easier to re-locate an instance.
parent cdd81d12
...@@ -45,6 +45,8 @@ import getopt ...@@ -45,6 +45,8 @@ import getopt
zeo_conf_template = """# ZEO configuration file zeo_conf_template = """# ZEO configuration file
%%define INSTANCE %(home)s
<zeo> <zeo>
address %(port)d address %(port)d
read-only false read-only false
...@@ -54,40 +56,42 @@ zeo_conf_template = """# ZEO configuration file ...@@ -54,40 +56,42 @@ zeo_conf_template = """# ZEO configuration file
</zeo> </zeo>
<filestorage 1> <filestorage 1>
path %(home)s/var/Data.fs path $INSTANCE/var/Data.fs
</filestorage> </filestorage>
<eventlog> <eventlog>
level info level info
<logfile> <logfile>
path %(home)s/log/zeo.log path $INSTANCE/log/zeo.log
</logfile> </logfile>
</eventlog> </eventlog>
""" """
runner_conf_template = """# %(package)sctl configuration file runner_conf_template = """# %(package)sctl configuration file
%%define INSTANCE %(home)s
<runner> <runner>
program %(server)s -C %(home)s/etc/%(package)s.conf program %(server)s -C $INSTANCE/etc/%(package)s.conf
socket-name %(home)s/etc/%(package)s.zdsock socket-name $INSTANCE/etc/%(package)s.zdsock
daemon true daemon true
forever false forever false
backoff-limit 10 backoff-limit 10
exit-codes 0, 2 exit-codes 0, 2
directory %(home)s directory $INSTANCE
default-to-interactive true default-to-interactive true
# user zope # user zope
python %(python)s python %(python)s
zdrun %(zdrun)s zdrun %(zdrun)s
# This logfile should match the one in the %(package)s.conf file. # This logfile should match the one in the %(package)s.conf file.
# It is used by zdctl's logtail command, zdrun/zdctl doesn't write it. # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it.
logfile %(home)s/log/%(package)s.log logfile $INSTANCE/log/%(package)s.log
</runner> </runner>
<eventlog> <eventlog>
level info level info
<logfile> <logfile>
path %(home)s/log/%(package)sctl.log path $INSTANCE/log/%(package)sctl.log
</logfile> </logfile>
</eventlog> </eventlog>
""" """
...@@ -103,7 +107,9 @@ zdctl_template = """#!/bin/sh ...@@ -103,7 +107,9 @@ zdctl_template = """#!/bin/sh
# chkconfig: 345 90 10 # chkconfig: 345 90 10
# description: start a %(PACKAGE)s server # description: start a %(PACKAGE)s server
exec %(zdctl)s -C %(home)s/etc/%(package)sctl.conf ${1+"$@"} INSTANCE='%(home)s'
exec %(zdctl)s -C "$INSTANCE/etc/%(package)sctl.conf" ${1+"$@"}
""" """
def main(): def main():
......
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