Skip to content
This repository has been archived by the owner on Sep 25, 2022. It is now read-only.

Commit

Permalink
Adding avahi-daemon addon to try and fix #22
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrar committed Jan 10, 2021
1 parent 492c22a commit 0eaa13a
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if you have any issues you can access the web interface on port 3689.

Note that Spotify support is not available on `aarch64`.

Note that the avahi-daemon addon is required if you're using the latest versions of Hassos.

# Raspotify

Spotify connect server, see [the github page](https://github.com/dtcooper/raspotify) for more info.
Expand All @@ -25,6 +27,11 @@ in the add-on configuration.
[Read the full add-on documentation](raspotify/DOCS.md).
# Avahi-Daemon
The newer versions of Hassos have moved form avahi to systemd-resolved, which is not compatible with forked-daapd.
This addon should allow forked-daapd, and any other addon that depends on avahi, to work.
# Radicale
Fully working radicale server, again with no config from the interface. The htpasswd users file must be /share/radicale/users and passwords must be hashed in md5.
Expand Down
33 changes: 33 additions & 0 deletions avahi-daemon/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ARG BUILD_FROM=hassioaddons/debian-base:3.0.0
# hadolint ignore=DL3006
FROM ${BUILD_FROM}

ARG BUILD_ARCH

ENV DEPS avahi-daemon

RUN apt-get update -y && apt-get install -y --no-install-recommends ${DEPS} \
&& rm -rf /var/lib/apt/lists/*

COPY rootfs /

ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION

LABEL \
io.hass.name="Avahi Daemon" \
io.hass.description="The avahi daemon" \
io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Ulrar" \
org.label-schema.description="The avahi daemon" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Avahi Daemon" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="" \
org.label-schema.usage="" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://github.com/Ulrar/hassio-addons/tree/master/avahi-daemon" \
org.label-schema.vendor="Ulrar addons"
9 changes: 9 additions & 0 deletions avahi-daemon/build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"build_from": {
"aarch64": "hassioaddons/debian-base-aarch64:3.0.0",
"amd64": "hassioaddons/debian-base-amd64:3.0.0",
"armv7": "hassioaddons/debian-base-armv7:3.0.0",
"i386": "hassioaddons/debian-base-i386:3.0.0"
},
"args": {}
}
31 changes: 31 additions & 0 deletions avahi-daemon/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "Avahi Daemon",
"version": "dev",
"slug": "avahi-daemon",
"panel_icon": "mdi:access-point",
"description": "Avahi Daemon needed by forked-daapd",
"url": "https://github.com/Ulrar/hassio-addons",
"stage": "experimental",
"ingress": false,
"startup": "application",
"arch": [
"aarch64",
"armv7",
"amd64",
"i386"
],
"boot": "auto",
"apparmor": true,
"hassio_api": false,
"auth_api": false,
"hassio_role": "default",
"audio": false,
"host_network": true,
"host_dbus": true,
"host_ipc": false,
"ports": {},
"ports_description": {},
"map": [],
"options": {},
"schema": {}
}
Binary file added avahi-daemon/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions avahi-daemon/rootfs/etc/services.d/avahi-daemon/finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# JPD Hass.io Add-ons: raspotify server
# Take down the S6 supervision tree when raspotify fails
# ==============================================================================
if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }

s6-svscanctl -t /var/run/s6/services
9 changes: 9 additions & 0 deletions avahi-daemon/rootfs/etc/services.d/avahi-daemon/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# avahi-daemon
# ==============================================================================
# shellcheck disable=SC1091

# Run avahi-daemon
bashio::log.info 'Starting the avahi daemon...'
exec /usr/sbin/avahi-daemon
2 changes: 1 addition & 1 deletion forked-daapd/rootfs/etc/services.d/forked-daapd/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

bashio::log.info 'Starting the forked-daapd Server...'
# Run forked-daapd
exec forked-daapd -f -c /share/forked-daapd/forked-daapd.conf -P /var/run/forked-daapd.pid --mdns-no-rsp --mdns-no-daap --mdns-no-cname --mdns-no-web
exec forked-daapd -f -c /share/forked-daapd/forked-daapd.conf -P /var/run/forked-daapd.pid
4 changes: 3 additions & 1 deletion raspotify/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"startup": "application",
"arch": [
"aarch64",
"armv7"
"armv7",
"amd64",
"i386"
],
"boot": "auto",
"apparmor": true,
Expand Down
1 change: 0 additions & 1 deletion raspotify/rootfs/etc/services.d/raspotify/run
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# JPD Hass.io Add-ons: raspotify server
# Runs the raspotify Server
# ==============================================================================
# shellcheck disable=SC1091
Expand Down

0 comments on commit 0eaa13a

Please sign in to comment.