mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Add command-line options, user configuration and daemon mode.
This commit is contained in:
parent
f1c8497f3b
commit
1b8608021f
3 changed files with 43 additions and 13 deletions
|
@ -26,6 +26,7 @@ Give a configparser-like interface to read and write configuration.
|
|||
|
||||
# TODO: Use abstract filenames for other platforms
|
||||
|
||||
import os
|
||||
try:
|
||||
from configparser import RawConfigParser as ConfigParser
|
||||
except ImportError:
|
||||
|
@ -45,6 +46,7 @@ _initial = {
|
|||
"protocol": "http",
|
||||
"name": "",
|
||||
"port": "5232",
|
||||
"daemon": "False",
|
||||
#"certificate": "/etc/apache2/ssl/server.crt",
|
||||
#"privatekey": "/etc/apache2/ssl/server.key",
|
||||
#"log": "/var/www/radicale/server.log",
|
||||
|
@ -64,7 +66,7 @@ _initial = {
|
|||
},
|
||||
"support": {
|
||||
"type": "plain",
|
||||
"folder": "~/.config/radicale",
|
||||
"folder": os.path.expanduser("~/.config/radicale"),
|
||||
"calendar": "radicale/calendar",
|
||||
},
|
||||
}
|
||||
|
@ -75,3 +77,4 @@ for section, values in _initial.items():
|
|||
_config.set(section, key, value)
|
||||
|
||||
_config.read("/etc/radicale/config")
|
||||
_config.read(os.path.expanduser("~/.config/radicale/config"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue