Skip to content

Commit

Permalink
Discovery Overseerr integration
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek committed Jan 22, 2025
1 parent c295e75 commit d67ad83
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions overseerr/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ map:
- addon_config:rw
- share:rw
- media:rw
discovery:
- overseerr
ports:
5055/tcp: 5055
Empty file.
22 changes: 22 additions & 0 deletions overseerr/rootfs/etc/s6-overlay/s6-rc.d/discovery/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Overseerr
# Sends discovery information to Home Assistant.
# ==============================================================================
declare config

# Wait for Overseerr to become available
bashio::net.wait_for 5055 127.0.0.1 300

config=$(\
bashio::var.json \
host "127.0.0.1" \
port "^5055" \
)

if bashio::discovery "overseerr" "${config}" > /dev/null; then
bashio::log.info "Successfully send discovery information to Home Assistant."
else
bashio::log.error "Discovery message to Home Assistant failed!"
fi
1 change: 1 addition & 0 deletions overseerr/rootfs/etc/s6-overlay/s6-rc.d/discovery/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions overseerr/rootfs/etc/s6-overlay/s6-rc.d/discovery/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/discovery/run
Empty file.

0 comments on commit d67ad83

Please sign in to comment.