~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead

  • Committer: Matt Nordhoff
  • Date: 2009-06-17 23:10:07 UTC
  • mto: This revision was merged to the branch mainline in revision 367.
  • Revision ID: mnordhoff@mattnordhoff.com-20090617231007-09y132sof4ix98po
Obey the http_serve setting for serving over hpss

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# along with this program; if not, write to the Free Software
14
14
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
15
15
 
16
 
"""A script for starting the loggerhead process."""
 
16
"""
 
17
WARNING! This script has been deprecated and will go away soon!
 
18
A script for starting the loggerhead process.
 
19
"""
17
20
 
18
21
 
19
22
import logging
23
26
import sys
24
27
import urlparse
25
28
 
26
 
from configobj import ConfigObj
 
29
from bzrlib.plugin import load_plugins
 
30
from bzrlib.util.configobj.configobj import ConfigObj
27
31
 
28
32
from paste import httpserver
29
33
from paste.httpexceptions import make_middleware
36
40
 
37
41
 
38
42
def main():
 
43
    sys.stderr.write('\n\n')
 
44
    sys.stderr.write('WARNING!!! This script has been deprecated by '
 
45
                     'serve-branches, and will be removed in the next '
 
46
                     'release. Please migrate to serve-branches and report '
 
47
                     'any missing features.\n')
 
48
    sys.stderr.write('\n\n')
 
49
 
39
50
    home = os.path.realpath(os.path.dirname(__file__))
40
51
    default_pidfile = os.path.join(home, 'loggerhead.pid')
41
52
    default_configfile = os.path.join(home, 'loggerhead.conf')
115
126
        def app(environ, start_response, orig=app):
116
127
            environ['SCRIPT_NAME'] = path
117
128
            environ['HTTP_HOST'] = netloc
 
129
            environ['wsgi.url_scheme'] = scheme
118
130
            return orig(environ, start_response)
119
131
 
 
132
    load_plugins()
 
133
 
120
134
    try:
121
135
        httpserver.serve(
122
136
            app, host=server_host, port=server_port,