Skip to content

Commit

Permalink
Update Alpine 3.12 / new mdns-repeater (#4)
Browse files Browse the repository at this point in the history
* Update Alpine 3.12 / new mdns-repeater

* Add CI
  • Loading branch information
pvizeli authored Aug 19, 2020
1 parent fbe0958 commit c7ac48d
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "06:00"
open-pull-requests-limit: 10
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
template: |
## What's Changed
$CHANGES
15 changes: 15 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ RUN \
git \
\
&& git clone -b ${MDNS_REPEATER_VERSION} --depth 1 \
https://github.com/kennylevinsen/mdns-repeater /usr/src/mdns \
https://github.com/pvizeli/mdns-repeater /usr/src/mdns \
&& cd /usr/src/mdns \
&& gcc -O3 -o /usr/bin/mdns-repeater \
mdns-repeater.c -DHGVERSION="\"${MDNS_REPEATER_VERSION}\"" \
mdns-repeater.c -DVERSION="\"${MDNS_REPEATER_VERSION}\"" \
\
&& apk del .build-deps \
&& rm -rf \
Expand Down
12 changes: 6 additions & 6 deletions build.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"image": "homeassistant/{arch}-hassio-multicast",
"build_from": {
"aarch64": "homeassistant/aarch64-base:3.11",
"armhf": "homeassistant/armhf-base:3.11",
"armv7": "homeassistant/armv7-base:3.11",
"amd64": "homeassistant/amd64-base:3.11",
"i386": "homeassistant/i386-base:3.11"
"aarch64": "homeassistant/aarch64-base:3.12",
"armhf": "homeassistant/armhf-base:3.12",
"armv7": "homeassistant/armv7-base:3.12",
"amd64": "homeassistant/amd64-base:3.12",
"i386": "homeassistant/i386-base:3.12"
},
"args": {
"MDNS_REPEATER_VERSION": "1.11"
"MDNS_REPEATER_VERSION": "1.1.0"
},
"labels": {
"io.hass.type": "multicast"
Expand Down
7 changes: 7 additions & 0 deletions rootfs/etc/cont-init.d/interface.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Detect active interface for mdns repeater
# ==============================================================================
interface=$(awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}' <<< "$(ip route get 8.8.8.8)")

echo "${interface}" > /var/run/s6/container_environment/ACTIVE_INTERFACE
3 changes: 1 addition & 2 deletions rootfs/etc/services.d/mdns/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
# ==============================================================================
# Start mDNS repeater service
# ==============================================================================
interface=$(awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}' <<< "$(ip route get 8.8.8.8)")

exec mdns-repeater -f ${interface} hassio
exec mdns-repeater -f ${ACTIVE_INTERFACE} hassio

0 comments on commit c7ac48d

Please sign in to comment.