diff --git a/config.in b/config.in index c24c734..a0b510e 100644 --- a/config.in +++ b/config.in @@ -1,2 +1,2 @@ -sql sqlite3 /var/lib/soju/main.db -log /var/lib/soju/logs/ +db sqlite3 /var/lib/soju/main.db +log fs /var/lib/soju/logs/ diff --git a/config/config.go b/config/config.go index 59b23cf..a9118a8 100644 --- a/config/config.go +++ b/config/config.go @@ -86,14 +86,18 @@ func parse(cfg scfg.Block) (*Server, error) { return nil, err } srv.TLS = tls - case "sql": + case "db": if err := d.ParseParams(&srv.SQLDriver, &srv.SQLSource); err != nil { return nil, err } case "log": - if err := d.ParseParams(&srv.LogPath); err != nil { + var driver string + if err := d.ParseParams(&driver, &srv.LogPath); err != nil { return nil, err } + if driver != "fs" { + return nil, fmt.Errorf("directive %q: unknown driver %q", d.Name, driver) + } case "http-origin": srv.HTTPOrigins = d.Params case "accept-proxy-ip": diff --git a/doc/soju.1.scd b/doc/soju.1.scd index 1c09429..7e3f2c4 100644 --- a/doc/soju.1.scd +++ b/doc/soju.1.scd @@ -101,12 +101,10 @@ The following directives are supported: *tls* Enable TLS support. The certificate and the key files must be PEM-encoded. -*sql* - Set the SQL driver settings. The only supported driver is "sqlite3". The - source is the path to the SQLite database file. By default, the path to the - database file is "soju.db". +*db* sqlite3 + Set the SQLite database path (default: "soju.db" in the current directory). -*log* +*log* fs Path to the bouncer logs root directory, or empty to disable logging. By default, logging is disabled.