Fix FCGI and WSGI scripts
This commit is contained in:
parent
7a7e67106a
commit
5b5edaac2f
@ -24,11 +24,11 @@ Launch a Radicale FastCGI server according to configuration.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import radicale
|
|
||||||
from flipflop import WSGIServer
|
from flipflop import WSGIServer
|
||||||
|
from radicale import Application, config, log
|
||||||
|
|
||||||
|
|
||||||
configuration = radicale.config.load([os.environ.get("RADICALE_CONFIG")])
|
configuration = config.load([os.environ.get("RADICALE_CONFIG")])
|
||||||
logger = radicale.log.start()
|
logger = log.start()
|
||||||
WSGIServer(radicale.Application(configuration, logger)).run()
|
WSGIServer(Application(configuration, logger)).run()
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@ Radicale WSGI file (mod_wsgi and uWSGI compliant).
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import radicale
|
from radicale import Application, config, log
|
||||||
|
|
||||||
|
|
||||||
configuration = radicale.config.load([os.environ.get("RADICALE_CONFIG")])
|
configuration = config.load([os.environ.get("RADICALE_CONFIG")])
|
||||||
logger = radicale.log.start()
|
logger = log.start()
|
||||||
application = radicale.Application(configuration, logger)
|
application = Application(configuration, logger)
|
||||||
|
@ -41,7 +41,7 @@ def configure_from_file(filename, debug, logger):
|
|||||||
def start(name="radicale", filename=None, debug=False):
|
def start(name="radicale", filename=None, debug=False):
|
||||||
"""Start the logging according to the configuration."""
|
"""Start the logging according to the configuration."""
|
||||||
logger = logging.getLogger(name)
|
logger = logging.getLogger(name)
|
||||||
if os.path.exists(filename):
|
if filename and os.path.exists(filename):
|
||||||
# Configuration taken from file
|
# Configuration taken from file
|
||||||
configure_from_file(logger, filename, debug)
|
configure_from_file(logger, filename, debug)
|
||||||
# Reload config on SIGHUP (UNIX only)
|
# Reload config on SIGHUP (UNIX only)
|
||||||
|
Loading…
Reference in New Issue
Block a user