refactor check for non-empty workdir#393
Conversation
introduce new envvar ROUNDCUBEMAIL_ALLOW_DIRTY_DOCROOT if it is true, skip checks for empty docroot. if it is false and the docroot is not empty, abort. if it is empty and the docroot is not empty, print a warning and sleep, giving the user the chance to manually abort. this keeps backwards compatibility with existing deployments (that do not have the envvar set) the sleep timeout has been raise to 60seconds, so the user has more time to manually abort (in a autostart context this will add an additional delay, but shouldn't actually be harmful) Closes: roundcube#384
|
I like this idea, thank you! Just one thing: could you reduce the "penalty" timeout back to 10 seconds? Because even that change might break setups if a system takes much longer to start than expected. And from my point of view I would reduce the possible truthy and falsy values. Using "yes" and "no" should be enough and makes for more clear documentation, too. But I won't force that if you care strongly about it. |
|
@pabzm, @thomascube |
please feel free to add a commit that aligns my PR with your expectations :-) |
|
@pabzm, @thomascube |
4 similar comments
|
@pabzm, @thomascube |
|
@pabzm, @thomascube |
|
@pabzm, @thomascube |
|
@pabzm, @thomascube |
introduce new envvar
ROUNDCUBEMAIL_ALLOW_DIRTY_DOCROOT, which can be truish, falsish or empty:truefalsethis keeps backwards compatibility with existing deployments (that do not have the envvar set)
the sleep timeout has been raise to 60seconds, so the user has more time to manually abort (in an autostart context, this will add an additional delay, but shouldn't actually be harmful)