Skip to content

wishlist: make timeout on non-empty workdir configurable #384

@umlaeute

Description

@umlaeute

while creating and re-creating my roundcube container (in the wake of #380 ) i got increasingly annoyed by the sleep time in

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developIssues that need engineering work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions