Commit graph

85 commits

Author SHA1 Message Date
Unrud
9b51e495ea Allow --config parameter multiple times 2020-01-13 15:51:11 +01:00
Unrud
88a0af8ba1 Improve documentation 2020-01-12 23:32:28 +01:00
Unrud
caf5ff1080 Change default value for external users 2020-01-12 23:32:26 +01:00
Unrud
a7f4ffa7d4 Rename Configuration.inspect to log_config_sources
The old name was misleading.
2020-01-12 23:32:25 +01:00
Unrud
b7590f8c84 Rework configuration 2019-06-17 04:18:09 +02:00
Unrud
63e6d091b9 Update copyright 2019-06-17 04:13:24 +02:00
Unrud
9d72341df2 Use CRITICAL level for start-up failures 2018-09-06 09:12:54 +02:00
Unrud
5e0a387ed9 remove whitespace before email 2018-09-04 03:33:47 +02:00
Unrud
5a433f5476 Test internal server 2018-09-04 03:33:45 +02:00
Unrud
8869b34470 refactor 2018-08-28 16:19:43 +02:00
Unrud
59f7104dce Replace option "debug" with "level" in "logging" 2018-08-16 08:00:02 +02:00
Unrud
3d77238a4b Move WSGI server to server.py 2018-08-16 08:00:00 +02:00
Unrud
e5e13faa7c Remove daemonization 2018-08-16 07:59:59 +02:00
Unrud
54b9995e22 Use module-wide logger and remove logging config 2018-08-16 07:59:55 +02:00
Frank Sachsenheim
50d3d01ea3 Uses absoulte imports as recommended in PEP-8 2018-04-20 16:03:36 +02:00
Unrud
2df009fac8 Add --verify-storage argument 2017-08-25 19:13:09 +02:00
Unrud
6d39a61a51 Shut down server on SIGINT on Windows
select.select blocks SIGINT on Windows.
2017-07-30 11:27:08 +02:00
Unrud
d34ee1217d Revert "Shut down server on SIGINT on Windows"
This reverts commit f8de674bd2.
2017-07-30 11:21:04 +02:00
Unrud
f8de674bd2 Shut down server on SIGINT on Windows 2017-07-30 11:00:24 +02:00
Unrud
276de4fd3a Allow additional config options for external plugins 2017-06-21 09:54:33 +02:00
Unrud
3af5809d71 Add option for CA certificate for validating clients
This can be used to secure TCP traffic between Radicale and a reverse proxy
2017-06-02 12:41:03 +02:00
Unrud
fd55bbce15 Adjust imports for isort 2017-06-01 11:54:04 +02:00
Unrud
c9664137a5 Improve error handling
* Check the configuration file for errors (check option names and basic type checking).
  * Perform basic type checking on command line arguments.
  * Only print stack traces in debug mode.
  * Include much more information in error messages (e.g. include the path of invalid files).
  * Send Bad Request to clients for invalid XML requests or iCalendar data.
  * Change the log level of some messages.
2017-05-31 11:31:54 +02:00
Unrud
9cd9ad9a02 Only register exit function if a PID file was created
The function only deletes the PID file.
2017-05-30 07:41:50 +02:00
Unrud
6762fc1cad Expand user on PID path 2017-05-30 05:10:07 +02:00
Unrud
fcccb3f7af Daemonize after creation of network sockets
The original process should exit after the server is ready.
See also https://www.freedesktop.org/software/systemd/man/daemon.html#SysV%20Daemons
2017-05-30 05:10:07 +02:00
Unrud
360e88f350 Write PID file in original process
This ensures that the PID is written, when the process exists.
2017-05-30 05:10:07 +02:00
Unrud
6ade44c773 Make relative PID path absolute
The daemon changes the current directory to root.
2017-05-30 05:10:07 +02:00
Unrud
65c53df5b3 Keep original exception when PID file creation fails 2017-05-30 05:10:07 +02:00
Unrud
79bcedd4bc Refactor: Extract daemonize function 2017-05-30 05:10:07 +02:00
Guillaume Ayoub
3e0c8cf285 Update copyright years 2017-05-27 17:28:07 +02:00
Unrud
d2a17c36ae Fail if configuration is not found
If a configuration file is passed with a command line argument and the file is not found, Radicale shows a warning and continues with the default configuration.
There is no reason for doing this, Radicale should just fail.

Instead, this PR allows passing an empty string like ``--config ""``. Radicale will use the default configuration in this case, without trying to load the configuration from the common paths. Previously you had to do specify a path that doesn't exist like ``--config /does/not/exist``, which looks a bit ugly and showed a warning message.
2017-05-24 21:01:23 +02:00
Guillaume Ayoub
864eb5931a Merge setup.cfg and pytest.ini, fix tests 2017-04-15 10:51:00 +02:00
Unrud
7d687205bd Use logger for WSGIServer
Log exception from the WSGIServer. Exceptions from socket timeouts are currently written to stderr.
2017-03-10 13:39:26 +01:00
Guillaume Ayoub
3213495245 Merge branch 'url' of https://github.com/Unrud/Radicale into Unrud-url 2017-02-26 14:43:59 +01:00
Guillaume Ayoub
34a82c9b69 Merge pull request #540 from twoodcock/master
remove umask(0) in daemon mode
2017-02-26 14:35:19 +01:00
Tim Woodcock
7f0d717459 remove umask(0) in daemon mode 2016-11-29 16:33:10 -08:00
Guillaume Ayoub
c459d32a19 Use argparse to parse command arguments
This commit also allows users to specify all the config values through
the command line.

Fix #154.
2016-10-12 14:30:18 +02:00
Yohann Rebattu
6d76cfa5aa use dash instead of underscore in options as well 2016-10-12 10:48:14 +02:00
Yohann Rebattu
fb3e733596 use dash instead of underscore 2016-10-12 10:44:13 +02:00
Yohann Rebattu
d6ee788ff5 comment… 2016-10-11 18:22:26 +02:00
Yohann Rebattu
ca2d519345 use group exclusively except for config 2016-10-11 18:21:17 +02:00
Yohann Rebattu
11710f75a8 allow config override from commandline 2016-10-11 18:17:01 +02:00
Unrud
dbaf58dbfe Remove base_prefix and use SCRIPT_NAME instead
This conforms with the WSGI reference (PEP 333)
2016-09-04 22:26:40 +02:00
Guillaume Ayoub
947c57312c Fix a variable name
Fix #494
2016-08-29 12:09:17 +02:00
Guillaume Ayoub
fd1742fcea Fix typo 2016-08-29 12:07:30 +02:00
Unrud
3b71ab960e Log exceptions (Fixes #447)
Exceptions were just written to stderr but not into logs.
2016-08-25 05:24:24 +02:00
Unrud
e2b87d145f Cosmetics: Don't use % for logging 2016-08-10 23:43:32 +02:00
Guillaume Ayoub
8ac3ce1a89 Clean many, many things 2016-08-05 02:14:49 +02:00
Guillaume Ayoub
3e52f34309 Remove pylint 2016-08-02 14:39:20 +02:00