Change default values for the config

Fix #346.
This commit is contained in:
Guillaume Ayoub 2017-03-04 14:06:09 +01:00
parent fc04e4543b
commit 8cc15a3d25
2 changed files with 18 additions and 17 deletions

19
config
View File

@ -15,8 +15,7 @@
# IPv4 syntax: address:port # IPv4 syntax: address:port
# IPv6 syntax: [address]:port # IPv6 syntax: [address]:port
# For example: 0.0.0.0:9999, [::]:9999 # For example: 0.0.0.0:9999, [::]:9999
# IPv6 adresses are configured to only allow IPv6 connections #hosts = 127.0.0.1:5232
#hosts = 0.0.0.0:5232
# Daemon flag # Daemon flag
#daemon = False #daemon = False
@ -37,13 +36,13 @@
#ssl = False #ssl = False
# SSL certificate path # SSL certificate path
#certificate = /etc/apache2/ssl/server.crt #certificate = /etc/ssl/radicale.cert.pem
# SSL private key # SSL private key
#key = /etc/apache2/ssl/server.key #key = /etc/ssl/radicale.key.pem
# SSL Protocol used. See python's ssl module for available values # SSL Protocol used. See python's ssl module for available values
#protocol = PROTOCOL_SSLv23 #protocol = PROTOCOL_TLSv1_2
# Available ciphers. See python's ssl module for available ciphers # Available ciphers. See python's ssl module for available ciphers
#ciphers = #ciphers =
@ -75,17 +74,19 @@
# Htpasswd encryption method # Htpasswd encryption method
# Value: plain | sha1 | ssha | crypt | bcrypt | md5 # Value: plain | sha1 | ssha | crypt | bcrypt | md5
#htpasswd_encryption = crypt # Only bcrypt can be considered secure.
# bcrypt and md5 require the passlib library to be installed.
#htpasswd_encryption = bcrypt
[rights] [rights]
# Rights backend # Rights backend
# Value: None | authenticated | owner_only | owner_write | from_file # Value: None | authenticated | owner_only | owner_write | from_file
#type = None #type = owner_only
# File for rights management from_file # File for rights management from_file
#file = ~/.config/radicale/rights #file = /etc/radicale/rights
[storage] [storage]
@ -95,7 +96,7 @@
#type = filesystem #type = filesystem
# Folder for storing local collections, created if not present # Folder for storing local collections, created if not present
#filesystem_folder = ~/.config/radicale/collections #filesystem_folder = /etc/radicale/collections
# Sync all changes to disk during requests. (This can impair performance.) # Sync all changes to disk during requests. (This can impair performance.)
# Disabling it increases the risk of data loss, when the system crashes or # Disabling it increases the risk of data loss, when the system crashes or

View File

@ -31,7 +31,7 @@ from configparser import RawConfigParser as ConfigParser
INITIAL_CONFIG = OrderedDict([ INITIAL_CONFIG = OrderedDict([
("server", OrderedDict([ ("server", OrderedDict([
("hosts", { ("hosts", {
"value": "0.0.0.0:5232", "value": "127.0.0.1:5232",
"help": "set server hostnames including ports", "help": "set server hostnames including ports",
"aliases": ["-H", "--hosts"]}), "aliases": ["-H", "--hosts"]}),
("daemon", { ("daemon", {
@ -58,15 +58,15 @@ INITIAL_CONFIG = OrderedDict([
"aliases": ["-s", "--ssl"], "aliases": ["-s", "--ssl"],
"opposite": ["-S", "--no-ssl"]}), "opposite": ["-S", "--no-ssl"]}),
("certificate", { ("certificate", {
"value": "/etc/apache2/ssl/server.crt", "value": "/etc/ssl/radicale.cert.pem",
"help": "set certificate file", "help": "set certificate file",
"aliases": ["-c", "--certificate"]}), "aliases": ["-c", "--certificate"]}),
("key", { ("key", {
"value": "/etc/apache2/ssl/server.key", "value": "/etc/ssl/radicale.key.pem",
"help": "set private key file", "help": "set private key file",
"aliases": ["-k", "--key"]}), "aliases": ["-k", "--key"]}),
("protocol", { ("protocol", {
"value": "PROTOCOL_SSLv23", "value": "PROTOCOL_TLSv1_2",
"help": "SSL protocol used"}), "help": "SSL protocol used"}),
("ciphers", { ("ciphers", {
"value": "", "value": "",
@ -92,14 +92,14 @@ INITIAL_CONFIG = OrderedDict([
"value": "/etc/radicale/users", "value": "/etc/radicale/users",
"help": "htpasswd filename"}), "help": "htpasswd filename"}),
("htpasswd_encryption", { ("htpasswd_encryption", {
"value": "crypt", "value": "bcrypt",
"help": "htpasswd encryption method"})])), "help": "htpasswd encryption method"})])),
("rights", OrderedDict([ ("rights", OrderedDict([
("type", { ("type", {
"value": "None", "value": "owner_only",
"help": "rights backend"}), "help": "rights backend"}),
("file", { ("file", {
"value": "~/.config/radicale/rights", "value": "/etc/radicale/rights",
"help": "file for rights management from_file"})])), "help": "file for rights management from_file"})])),
("storage", OrderedDict([ ("storage", OrderedDict([
("type", { ("type", {
@ -107,7 +107,7 @@ INITIAL_CONFIG = OrderedDict([
"help": "storage backend"}), "help": "storage backend"}),
("filesystem_folder", { ("filesystem_folder", {
"value": os.path.expanduser( "value": os.path.expanduser(
"~/.config/radicale/collections"), "/etc/radicale/collections"),
"help": "file for rights management from_file"}), "help": "file for rights management from_file"}),
("filesystem_fsync", { ("filesystem_fsync", {
"value": "True", "value": "True",