Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dubo-dubon-duponey committed Mar 15, 2024
1 parent 5b8d663 commit da6a039
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ FROM $FROM_REGISTRY/$FROM_IMAGE_TOOLS
FROM --platform=$BUILDPLATFORM $FROM_REGISTRY/$FROM_IMAGE_BUILDER AS fetcher-lego

ARG GIT_REPO=github.com/go-acme/lego
ARG GIT_VERSION=v4.15.0
ARG GIT_COMMIT=46fe435c2c2e447ae48df712eca8278bbca8986e
ARG GIT_VERSION=v4.16.1
ARG GIT_COMMIT=40dcce60be3dbbd0ae05b789e486341b6741e2ae

ENV WITH_BUILD_SOURCE="./cmd/lego"
ENV WITH_BUILD_OUTPUT="lego"
Expand Down
20 changes: 20 additions & 0 deletions context/runtime/boot/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,23 @@ helpers::dir::writable(){
exit 1
}
}

helpers::log::normalize(){
local lower
lower="$(printf "%s" "${LOG_LEVEL:-}" | tr '[:upper:]' '[:lower:]')"
case "$lower" in
"debug")
;;
"info")
;;
"error")
;;
*)
lower="warning"
;;
esac
LOG_LEVEL="$lower"
printf "%s" "$LOG_LEVEL"
}

helpers::log::normalize >/dev/null
2 changes: 1 addition & 1 deletion context/runtime/boot/mdns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ mdns::start::avahi(){
# Cleanup leftovers on container restart
rm -f "$(dirname "$avahisocket")/pid"

[ "$(printf "%s" "$LOG_LEVEL" | tr '[:upper:]' '[:lower:]')" != "debug" ] || args+=(--debug)
[ "$LOG_LEVEL" != "debug" ] || args+=(--debug)

# -D/--daemonize implies -s/--syslog that we do not want, so, just background it
avahi-daemon -f /config/avahi/main.conf --no-drop-root --no-chroot "${args[@]}" &
Expand Down

0 comments on commit da6a039

Please sign in to comment.