mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
22 lines
479 B
Bash
Executable File
22 lines
479 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
cmd-events-default() {
|
|
declare desc="shows contents of dokku events log"
|
|
declare cmd="events"
|
|
[[ "$1" == "$cmd" ]] && shift 1
|
|
declare TAIL="$1"
|
|
|
|
if [[ -f $DOKKU_EVENTS_LOGFILE ]]; then
|
|
if [[ "$TAIL" == "-t" ]]; then
|
|
tail -F "$DOKKU_EVENTS_LOGFILE"
|
|
else
|
|
tail -n 100 "$DOKKU_EVENTS_LOGFILE"
|
|
fi
|
|
fi
|
|
}
|
|
|
|
cmd-events-default "$@"
|