mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
bin: Put log parameter handling logic together
This commit is contained in:
parent
335705e03d
commit
ab408ce653
1 changed files with 2 additions and 2 deletions
|
@ -22,15 +22,15 @@ error() { log "ERROR: $@" >&2; }
|
|||
fatal() { error "$@"; exit 1; }
|
||||
|
||||
LAST_EMAIL_SEND=0
|
||||
LOG="$1"
|
||||
|
||||
# Move to the folder where ep-lite is installed
|
||||
cd "$(dirname "$0")"/..
|
||||
|
||||
# Check if a logfile parameter is set
|
||||
LOG="$1"
|
||||
[ -n "${LOG}" ] || fatal "Set a logfile as the first parameter"
|
||||
|
||||
shift
|
||||
|
||||
while true; do
|
||||
# Try to touch the file if it doesn't exist
|
||||
[ -f "${LOG}" ] || touch "${LOG}" || fatal "Logfile '${LOG}' is not writeable"
|
||||
|
|
Loading…
Reference in a new issue