mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-19 05:49:12 +02:00
feat: new addon
This commit is contained in:
@@ -79,6 +79,7 @@ https://github.com/alexbelgium/hassio-addons
|
|||||||
- [Firefly III Data Importer](fireflyiii_data_importer/) : Data importer for Firefly III
|
- [Firefly III Data Importer](fireflyiii_data_importer/) : Data importer for Firefly III
|
||||||
- [Mealie](mealie/) : Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. This addon is based on the docker image from hay-kot.
|
- [Mealie](mealie/) : Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. This addon is based on the docker image from hay-kot.
|
||||||
- [Tandoor Recipes](tandoor_recipes/): Recipe manager
|
- [Tandoor Recipes](tandoor_recipes/): Recipe manager
|
||||||
|
- [TP-link Omada](omada/): TP-Link Omada Controller
|
||||||
- [Wger](wger/): manage your personal workouts, weight and diet plans
|
- [Wger](wger/): manage your personal workouts, weight and diet plans
|
||||||
- [Zoneminder](zoneminder/): a full-featured, open source, state-of-the-art video surveillance software system
|
- [Zoneminder](zoneminder/): a full-featured, open source, state-of-the-art video surveillance software system
|
||||||
|
|
||||||
|
|||||||
1
omada/CHANGELOG.md
Normal file
1
omada/CHANGELOG.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
- Initial release
|
||||||
97
omada/Dockerfile
Normal file
97
omada/Dockerfile
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
#============================#
|
||||||
|
# ALEXBELGIUM'S DOCKERFILE #
|
||||||
|
#============================#
|
||||||
|
# _.------.
|
||||||
|
# _.-` ('>.-`"""-.
|
||||||
|
# '.--'` _'` _ .--.)
|
||||||
|
# -' '-.-';` `
|
||||||
|
# ' - _.' ``'--.
|
||||||
|
# '---` .-'""`
|
||||||
|
# /`
|
||||||
|
#=== Home Assistant Addon ===#
|
||||||
|
|
||||||
|
#################
|
||||||
|
# 1 Build Image #
|
||||||
|
#################
|
||||||
|
|
||||||
|
ARG BUILD_FROM
|
||||||
|
ARG BUILD_VERSION
|
||||||
|
ARG BUILD_UPSTREAM="5.1.7"
|
||||||
|
FROM ${BUILD_FROM}
|
||||||
|
|
||||||
|
##################
|
||||||
|
# 2 Modify Image #
|
||||||
|
##################
|
||||||
|
|
||||||
|
RUN echo "Adding symlinks to entrypoint" \
|
||||||
|
&& sed -i \
|
||||||
|
-e '1a chmod a+x /etc/cont-init.d/*' \
|
||||||
|
-e '1a sed -i "s|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g" /etc/cont-init.d/*' \
|
||||||
|
-e '1a for i in /etc/cont-init.d/*; do /."$i"; done' \
|
||||||
|
/entrypoint.sh
|
||||||
|
|
||||||
|
##################
|
||||||
|
# 3 Install apps #
|
||||||
|
##################
|
||||||
|
|
||||||
|
# Copy local files
|
||||||
|
COPY rootfs/ /
|
||||||
|
|
||||||
|
# Modules
|
||||||
|
ARG MODULES="00-banner.sh"
|
||||||
|
|
||||||
|
# Automatic modules download
|
||||||
|
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||||
|
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
|
||||||
|
&& mkdir -p /etc/cont-init.d \
|
||||||
|
&& for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \
|
||||||
|
&& chmod -R 755 /etc/cont-init.d || printf '%s\n' "${MODULES}" >/MODULESFILE
|
||||||
|
|
||||||
|
# Manual apps
|
||||||
|
ENV PACKAGES=""
|
||||||
|
|
||||||
|
# Automatic apps & bashio
|
||||||
|
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||||
|
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
|
||||||
|
&& curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh \
|
||||||
|
&& chmod 777 /automatic_packages.sh \
|
||||||
|
&& eval /./automatic_packages.sh "${PACKAGES:-}" \
|
||||||
|
&& rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE
|
||||||
|
|
||||||
|
################
|
||||||
|
# 4 Entrypoint #
|
||||||
|
################
|
||||||
|
|
||||||
|
#RUN chmod 777 /entrypoint.sh
|
||||||
|
#ENTRYPOINT [ "/usr/bin/env" ]
|
||||||
|
#CMD [ "/entrypoint.sh" ]
|
||||||
|
|
||||||
|
############
|
||||||
|
# 5 Labels #
|
||||||
|
############
|
||||||
|
|
||||||
|
ARG BUILD_ARCH
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG BUILD_DESCRIPTION
|
||||||
|
ARG BUILD_NAME
|
||||||
|
ARG BUILD_REF
|
||||||
|
ARG BUILD_REPOSITORY
|
||||||
|
ARG BUILD_VERSION
|
||||||
|
LABEL \
|
||||||
|
io.hass.name="${BUILD_NAME}" \
|
||||||
|
io.hass.description="${BUILD_DESCRIPTION}" \
|
||||||
|
io.hass.arch="${BUILD_ARCH}" \
|
||||||
|
io.hass.type="addon" \
|
||||||
|
io.hass.version=${BUILD_VERSION} \
|
||||||
|
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
||||||
|
org.opencontainers.image.title="${BUILD_NAME}" \
|
||||||
|
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
||||||
|
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
||||||
|
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
||||||
|
org.opencontainers.image.licenses="MIT" \
|
||||||
|
org.opencontainers.image.url="https://github.com/alexbelgium" \
|
||||||
|
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
||||||
|
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
|
||||||
|
org.opencontainers.image.created=${BUILD_DATE} \
|
||||||
|
org.opencontainers.image.revision=${BUILD_REF} \
|
||||||
|
org.opencontainers.image.version=${BUILD_VERSION}
|
||||||
48
omada/Readme.md
Normal file
48
omada/Readme.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# Home assistant add-on: Omada controller
|
||||||
|
|
||||||
|
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
[](https://www.codacy.com/gh/alexbelgium/hassio-addons/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alexbelgium/hassio-addons&utm_campaign=Badge_Grade)
|
||||||
|
[](https://github.com/marketplace/actions/super-linter)
|
||||||
|
[](https://github.com/alexbelgium/hassio-addons/actions/workflows/builder.yaml)
|
||||||
|
|
||||||
|
[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white
|
||||||
|
|
||||||
|
_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_
|
||||||
|
|
||||||
|
[](https://github.com/alexbelgium/hassio-addons/stargazers)
|
||||||
|
|
||||||
|
## About
|
||||||
|
|
||||||
|
[TP-Link Omada Controller](https://www.tp-link.com/us/business-networking/omada-sdn-controller/) to control [TP-Link Omada Hardware](https://www.tp-link.com/en/business-networking/all-omada/).
|
||||||
|
|
||||||
|
This addon is based on the docker image https://hub.docker.com/r/mbentley/omada-controller
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Read official documentation for information how to set : https://hub.docker.com/r/mbentley/omada-controller
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on.
|
||||||
|
|
||||||
|
1. Add my add-ons repository to your home assistant instance (in supervisor addons store at top right, or click button below if you have configured my HA)
|
||||||
|
[](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons)
|
||||||
|
1. Install this add-on.
|
||||||
|
1. Click the `Save` button to store your configuration.
|
||||||
|
1. Set the add-on options to your preferences
|
||||||
|
1. Start the add-on.
|
||||||
|
1. Check the logs of the add-on to see if everything went well.
|
||||||
|
1. Open the webUI and adapt the software options
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
Create an issue on github
|
||||||
|
|
||||||
|
## Illustration
|
||||||
|
|
||||||
|
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||||
56
omada/apparmor.txt
Normal file
56
omada/apparmor.txt
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#include <tunables/global>
|
||||||
|
|
||||||
|
profile omada_addon flags=(attach_disconnected,mediate_deleted) {
|
||||||
|
#include <abstractions/base>
|
||||||
|
|
||||||
|
capability,
|
||||||
|
file,
|
||||||
|
signal,
|
||||||
|
mount,
|
||||||
|
umount,
|
||||||
|
remount,
|
||||||
|
network udp,
|
||||||
|
network tcp,
|
||||||
|
network dgram,
|
||||||
|
network stream,
|
||||||
|
network inet,
|
||||||
|
network inet6,
|
||||||
|
network netlink raw,
|
||||||
|
|
||||||
|
capability setgid,
|
||||||
|
capability setuid,
|
||||||
|
capability sys_admin,
|
||||||
|
capability dac_read_search,
|
||||||
|
# capability dac_override,
|
||||||
|
# capability sys_rawio,
|
||||||
|
|
||||||
|
# S6-Overlay
|
||||||
|
/bin/** ix,
|
||||||
|
/usr/bin/** ix,
|
||||||
|
/usr/lib/bashio/** ix,
|
||||||
|
/etc/s6/** rix,
|
||||||
|
/run/s6/** rix,
|
||||||
|
/etc/services.d/** rwix,
|
||||||
|
/etc/cont-init.d/** rwix,
|
||||||
|
/etc/cont-finish.d/** rwix,
|
||||||
|
/init rix,
|
||||||
|
/var/run/** mrwkl,
|
||||||
|
/var/run/ mrwkl,
|
||||||
|
/dev/i2c-1 mrwkl,
|
||||||
|
# Files required
|
||||||
|
/dev/sda1 mrwkl,
|
||||||
|
/dev/sdb1 mrwkl,
|
||||||
|
/dev/mmcblk0p1 mrwkl,
|
||||||
|
/dev/* mrwkl,
|
||||||
|
/tmp/** mrkwl,
|
||||||
|
|
||||||
|
# Data access
|
||||||
|
/data/** rw,
|
||||||
|
|
||||||
|
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
|
||||||
|
ptrace (trace,read) peer=docker-default,
|
||||||
|
|
||||||
|
# docker daemon confinement requires explict allow rule for signal
|
||||||
|
signal (receive) set=(kill,term) peer=/usr/bin/docker,
|
||||||
|
|
||||||
|
}
|
||||||
7
omada/build.json
Normal file
7
omada/build.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"build_from": {
|
||||||
|
"armv7": "mbentley/omada-controller:latest",
|
||||||
|
"aarch64": "mbentley/omada-controller:latest",
|
||||||
|
"amd64": "mbentley/omada-controller:latest"
|
||||||
|
}
|
||||||
|
}
|
||||||
47
omada/config.json
Normal file
47
omada/config.json
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"apparmor": true,
|
||||||
|
"arch": ["aarch64", "amd64", "armv7"],
|
||||||
|
"boot": "auto",
|
||||||
|
"description": "TP-Link Omada Controller",
|
||||||
|
"environment": {
|
||||||
|
"MANAGE_HTTP_PORT": "8088",
|
||||||
|
"MANAGE_HTTPS_PORT": "8043",
|
||||||
|
"PORTAL_HTTP_PORT": "8088",
|
||||||
|
"PORTAL_HTTPS_PORT": "8843",
|
||||||
|
"SHOW_SERVER_LOGS": "true",
|
||||||
|
"SHOW_MONGODB_LOGS": "false",
|
||||||
|
"SSL_CERT_NAME": "tls.crt",
|
||||||
|
"SSL_KEY_NAME": "tls.key",
|
||||||
|
"TZ": "Etc/UTC"
|
||||||
|
},
|
||||||
|
"image": "ghcr.io/alexbelgium/omada-{arch}",
|
||||||
|
"name": "Omada",
|
||||||
|
"options": {},
|
||||||
|
"ports": {
|
||||||
|
"8088/tcp": 8088,
|
||||||
|
"8043/tcp": 8043,
|
||||||
|
"8843/tcp": 8843,
|
||||||
|
"29810/tcp": 29810,
|
||||||
|
"29811/tcp": 29811,
|
||||||
|
"29812/tcp": 29812,
|
||||||
|
"29813/tcp": 29813,
|
||||||
|
"29814/tcp": 29814
|
||||||
|
},
|
||||||
|
"map": ["config:rw"],
|
||||||
|
"ports_description": {
|
||||||
|
"8088/tcp": "web interface",
|
||||||
|
"8043/tcp": "web interface https",
|
||||||
|
"8843/tcp": "portal http",
|
||||||
|
"29810/tcp": "omada port",
|
||||||
|
"29811/tcp": "omada port",
|
||||||
|
"29812/tcp": "omada port",
|
||||||
|
"29813/tcp": "omada port",
|
||||||
|
"29814/tcp": "omada port"
|
||||||
|
},
|
||||||
|
"schema": {},
|
||||||
|
"slug": "omada",
|
||||||
|
"upstream": "5.1.7",
|
||||||
|
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||||
|
"version": "5.1.7",
|
||||||
|
"webui": "[PROTO:ssl]://[HOST]:[PORT:8088]"
|
||||||
|
}
|
||||||
BIN
omada/icon.png
Normal file
BIN
omada/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
omada/logo.png
Normal file
BIN
omada/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
33
omada/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh
Normal file
33
omada/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# If dockerfile failed install manually
|
||||||
|
|
||||||
|
##############################
|
||||||
|
# Automatic modules download #
|
||||||
|
##############################
|
||||||
|
if [ -e "/MODULESFILE" ]; then
|
||||||
|
MODULES=$(</MODULESFILE)
|
||||||
|
MODULES="${MODULES:-00-banner.sh}"
|
||||||
|
echo "Executing modules script : $MODULES"
|
||||||
|
|
||||||
|
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||||
|
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
|
||||||
|
&& mkdir -p /etc/cont-init.d \
|
||||||
|
&& for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \
|
||||||
|
&& chmod -R 755 /etc/cont-init.d
|
||||||
|
fi
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Automatic installer #
|
||||||
|
#######################
|
||||||
|
if [ -e "/ENVFILE" ]; then
|
||||||
|
PACKAGES=$(</ENVFILE)
|
||||||
|
echo "Executing dependency script with custom elements : $PACKAGES"
|
||||||
|
|
||||||
|
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||||
|
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
|
||||||
|
&& curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh \
|
||||||
|
&& chmod 777 /automatic_packages.sh \
|
||||||
|
&& eval /./automatic_packages.sh "${PACKAGES:-}" \
|
||||||
|
&& rm /automatic_packages.sh
|
||||||
|
fi
|
||||||
30
omada/rootfs/etc/cont-init.d/00-folders.sh
Normal file
30
omada/rootfs/etc/cont-init.d/00-folders.sh
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
CONFIGSOURCE="/config/addons_config/omada"
|
||||||
|
|
||||||
|
# Create directory
|
||||||
|
if [ ! -f "$CONFIGSOURCE" ]; then
|
||||||
|
echo "Creating directory"
|
||||||
|
mkdir -p "$CONFIGSOURCE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure structure is correct
|
||||||
|
mkdir -p "$CONFIGSOURCE"/db "$CONFIGSOURCE"/html "$CONFIGSOURCE"/pdf
|
||||||
|
cp -rnf /opt/tplink/EAPController/data/* "$CONFIGSOURCE"
|
||||||
|
|
||||||
|
# Make sure permissions are right
|
||||||
|
echo "Updating permissions"
|
||||||
|
chown -R "508:508" "$CONFIGSOURCE"
|
||||||
|
|
||||||
|
# Delete previous directories
|
||||||
|
echo "Removing previous directories"
|
||||||
|
rm -r /opt/tplink/EAPController/data/html
|
||||||
|
rm -r /opt/tplink/EAPController/data/pdf
|
||||||
|
rm -r /opt/tplink/EAPController/data/db
|
||||||
|
|
||||||
|
# Create symlink
|
||||||
|
echo "Creating symlink"
|
||||||
|
ln -s /config/addons_config/omada/pdf /opt/tplink/EAPController/data/pdf
|
||||||
|
ln -s /config/addons_config/omada/html /opt/tplink/EAPController/data/html
|
||||||
|
ln -s /config/addons_config/omada/db /opt/tplink/EAPController/data/db
|
||||||
Reference in New Issue
Block a user