[Zope3-checkins] SVN: Zope3/trunk/skel/bin/runzope.in Add a runzope
script to run Zope X3 in the foreground.
Fred L. Drake, Jr.
fred at zope.com
Fri May 14 13:53:33 EDT 2004
Log message for revision 24668:
Add a runzope script to run Zope X3 in the foreground.
-=-
Added: Zope3/trunk/skel/bin/runzope.in
===================================================================
--- Zope3/trunk/skel/bin/runzope.in 2004-05-14 17:53:13 UTC (rev 24667)
+++ Zope3/trunk/skel/bin/runzope.in 2004-05-14 17:53:33 UTC (rev 24668)
@@ -0,0 +1,42 @@
+#!/usr/bin/env python2.3
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Script to run the Zope Application Server in the foreground.
+
+$Id$
+"""
+import os
+import sys
+
+
+SOFTWARE_HOME = "<<SOFTWARE_HOME>>"
+INSTANCE_HOME = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+CONFIG_FILE = os.path.join(INSTANCE_HOME, "etc", "zope.conf")
+
+
+def run():
+ # This removes the script directory from sys.path, which we do
+ # since there are no modules here.
+ #
+ basepath = filter(None, sys.path)
+
+ sys.path[:] = [os.path.join(INSTANCE_HOME, "lib", "python"),
+ SOFTWARE_HOME] + basepath
+
+ from zope.app.process.main import main
+ main(["-C", CONFIG_FILE] + sys.argv[1:])
+
+
+if __name__ == '__main__':
+ run()
Property changes on: Zope3/trunk/skel/bin/runzope.in
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/x-python
Name: svn:eol-style
+ native
More information about the Zope3-Checkins
mailing list