mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-08 20:14:43 +02:00
Change 'while' style (#3365)
This commit is contained in:
parent
37ca0f9ba9
commit
c2d0b748b2
18 changed files with 22 additions and 44 deletions
|
@ -9,8 +9,7 @@ LOCK_ID=$(uuid)
|
|||
|
||||
function _create_lock() {
|
||||
LOCK_FILE="/tmp/docker-mailserver/${SCRIPT_NAME}.lock"
|
||||
while [[ -e "${LOCK_FILE}" ]]
|
||||
do
|
||||
while [[ -e "${LOCK_FILE}" ]]; do
|
||||
# Handle stale lock files left behind on crashes
|
||||
# or premature/non-graceful exits of containers while they're making changes
|
||||
if [[ -n "$(find "${LOCK_FILE}" -mmin +1 2>/dev/null)" ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue