diff --git a/Makefile b/Makefile index cdeafb8..00eade9 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,8 @@ build: clean: podman image rm ${REPO}/${IMAGENAME}:$(VERSION) -release: guard clean build - git tag v$(VERSION) +release: guard build + $(eval TMP_MESSAGE := $(shell podman run --rm -it ${REPO}/${IMAGENAME}:$(VERSION) /usr/sbin/dnsmasq --version)) + git tag -a v$(VERSION) -m "${TMP_MESSAGE}" git push origin v$(VERSION) podman push --creds $(USERNAME):$(PASSWORD) ${REPO}/${IMAGENAME}:$(VERSION) diff --git a/entrypoint.sh b/entrypoint.sh index e54f4b4..19d54a6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,24 +1,24 @@ #!/usr/bin/env bash -if [[ ! -f /config/dnsmasq.conf ]]; then - echo "* Creating /config/dnsmasq.conf" - sed 's/^conf-dir=\/etc\//conf-dir=\/config\//g' /etc/dnsmasq.conf > /config/dnsmasq.conf -fi -if [[ ! -f /config/hosts/hosts ]]; then - echo "* Creating /config/hosts/hosts" - mkdir /config/hosts - cp /etc/hosts /config/hosts/hosts -fi -if [[ ! -f /config/resolv.conf ]]; then - echo "* Creating /config/resolv.conf" - cp /etc/resolv.conf /config/resolv.conf -fi -if [[ ! -d /config/dnsmasq.d ]]; then - echo "* Creating /config/dnsmasq.d" - mkdir /config/dnsmasq.d -fi if [[ "$1" == "start" ]]; then + if [[ ! -f /config/dnsmasq.conf ]]; then + echo "* Creating /config/dnsmasq.conf" + sed 's/^conf-dir=\/etc\//conf-dir=\/config\//g' /etc/dnsmasq.conf > /config/dnsmasq.conf + fi + if [[ ! -f /config/hosts/hosts ]]; then + echo "* Creating /config/hosts/hosts" + mkdir /config/hosts + cp /etc/hosts /config/hosts/hosts + fi + if [[ ! -f /config/resolv.conf ]]; then + echo "* Creating /config/resolv.conf" + cp /etc/resolv.conf /config/resolv.conf + fi + if [[ ! -d /config/dnsmasq.d ]]; then + echo "* Creating /config/dnsmasq.d" + mkdir /config/dnsmasq.d + fi /usr/sbin/dnsmasq \ --conf-fil=/config/dnsmasq.conf \ --no-daemon --no-hosts \