diff options
Diffstat (limited to 'cfg_parser.rl')
-rw-r--r-- | cfg_parser.rl | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/cfg_parser.rl b/cfg_parser.rl index 9394ea7..af6419f 100644 --- a/cfg_parser.rl +++ b/cfg_parser.rl @@ -63,7 +63,22 @@ static char *mystrdup(const char *key, char *mark_beg, const char *p) cfg->pidfile = mystrdup("pidfile", mark_beg, fpc); if (!cfg->pidfile) return -1; }; - daemonize = lws* "daemonize" comment* eor > { cfg->daemonize = true; }; + daemonize_compat = lws* "daemonize" comment* eor > { + syslog(LOG_ERR, +"\"daemonize\" in was supported in error in the past and now deprecated"); + syslog(LOG_ERR, +"use \"daemonize = 1\" in your config file instead"); + cfg->daemonize = true; + }; + daemonize = lws* "daemonize" sep + ((any - space)+) > { mark_beg = fpc; } + (comment* eor) > { + mark_len = fpc - mark_beg; + mark_beg[mark_len] = 0; + + /* special case for compatibility with mogstored */ + cfg->daemonize = strcmp("0", mark_beg); + }; maxconns = lws* "maxconns" sep (digit+) > { mark_beg = fpc; } (comment* eor) > { @@ -93,7 +108,7 @@ static char *mystrdup(const char *key, char *mark_beg, const char *p) free(tmp); }; main := (mgmtlisten | httplisten | httpgetlisten | - pidfile | docroot | daemonize | maxconns | + pidfile | docroot | daemonize | daemonize_compat | maxconns | server | serverbin ) + $! { fhold; |