mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-02 09:05:14 +02:00
renamed function _errex
-> _exit_with_error
(#2497)
This commit is contained in:
parent
37c8e44566
commit
b7bf40ac21
18 changed files with 45 additions and 45 deletions
|
@ -1,12 +1,12 @@
|
|||
#! /bin/bash
|
||||
|
||||
function _errex
|
||||
function _exit_with_error
|
||||
{
|
||||
if [[ -n ${1+set} ]]
|
||||
then
|
||||
_log 'error' "${1}"
|
||||
else
|
||||
_log 'error' "Call to '_errex' is missing a message to log"
|
||||
_log 'error' "Call to '_exit_with_error' is missing a message to log"
|
||||
fi
|
||||
|
||||
_log 'error' 'Aborting'
|
||||
|
|
|
@ -31,7 +31,7 @@ function _create_lock
|
|||
function _remove_lock
|
||||
{
|
||||
LOCK_FILE="${LOCK_FILE:-"/tmp/docker-mailserver/${SCRIPT_NAME}.lock"}"
|
||||
[[ -z "${LOCK_ID}" ]] && _errex "Cannot remove ${LOCK_FILE} as there is no LOCK_ID set"
|
||||
[[ -z "${LOCK_ID}" ]] && _exit_with_error "Cannot remove ${LOCK_FILE} as there is no LOCK_ID set"
|
||||
if [[ -e "${LOCK_FILE}" ]] && grep -q "${LOCK_ID}" "${LOCK_FILE}" # Ensure we don't delete a lock that's not ours
|
||||
then
|
||||
rm -f "${LOCK_FILE}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue