-
Notifications
You must be signed in to change notification settings - Fork 138
Description
while creating and re-creating my roundcube container (in the wake of #380 ) i got increasingly annoyed by the sleep time in
roundcubemail-docker/templates/docker-entrypoint.sh
Lines 40 to 43 in a0db4b1
| if [ "$(ls -A)" ]; then | |
| echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!" | |
| ( set -x; ls -A; sleep 10 ) | |
| fi |
I know that my /var/www/html is not empty, because i bind-mount my personal-skin to /var/www/html/skins/umlaeute, so there is no reason to make me wait whenever I create a new container.
I also understand that you might want to keep this sleep as a safeguard for misconfigurations.
so how about allowing the user to override the timeout?
like so:
( set -x; ls -A; sleep "${ROUNDCUBE_EMPTYWORKDIR_TIMEOUT:-10}" ) which allows me have ROUNDCUBE_EMPTYWORKDIR_TIMEOUT=0 in my .env file to just skip the sleep (obviously this could be improved, to not emit the "Press ^C to abort" if the timeout is 0; and whatnot)