mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
New addon : omada 3.2
https://github.com/alexbelgium/hassio-addons/issues/488
This commit is contained in:
63
omada_v3/CHANGELOG.md
Normal file
63
omada_v3/CHANGELOG.md
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
|
||||||
|
## 5.5-chromium-amd64-2022-09-18 (2022-09-18)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.5-chromium-amd64-2022-09-16 (2022-09-16)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.5-chromium-amd64-2022-09-13 (2022-09-13)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.5-chromium-amd64-2022-09-11 (2022-09-11)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.5-chromium-amd64-2022-09-04 (2022-09-04)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.5-chromium-amd64-2022-09-02 (2022-09-02)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.5-chromium-amd64-2022-08-28 (2022-08-28)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 4.4-arm64-2022-08-31 (2022-08-31)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.5-chromium-2022-08-29 (2022-08-29)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
- run add_on on host network so controller can outgres to physical
|
||||||
|
network properly
|
||||||
|
|
||||||
|
## 5.5-chromium-amd64-2022-08-26 (2022-08-26)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.5-chromium-2022-08-24 (2022-08-24)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.4-chromium-amd64-2022-08-22 (2022-08-22)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.4-chromium-2022-08-19 (2022-08-19)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.4-chromium-2022-08-17 (2022-08-17)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.3-chromium-2022-08-15 (2022-08-15)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.4-chromium-2022-08-12 (2022-08-12)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.4-chromium-arm64-2022-08-11 (2022-08-11)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.4-chromium-arm64-2022-08-11T21:32:36.717277Z (2022-08-11T21:32:36.717277Z)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.4-chromium-arm64 (11-08-2022)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
|
||||||
|
## 5.1.7 (14-04-2022)
|
||||||
|
- Update to latest version from mbentley/omada-controller
|
||||||
|
- Initial release
|
||||||
110
omada_v3/Dockerfile
Normal file
110
omada_v3/Dockerfile
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
#============================#
|
||||||
|
# ALEXBELGIUM'S DOCKERFILE #
|
||||||
|
#============================#
|
||||||
|
# _.------.
|
||||||
|
# _.-` ('>.-`"""-.
|
||||||
|
# '.--'` _'` _ .--.)
|
||||||
|
# -' '-.-';` `
|
||||||
|
# ' - _.' ``'--.
|
||||||
|
# '---` .-'""`
|
||||||
|
# /`
|
||||||
|
#=== Home Assistant Addon ===#
|
||||||
|
|
||||||
|
#################
|
||||||
|
# 1 Build Image #
|
||||||
|
#################
|
||||||
|
|
||||||
|
ARG BUILD_FROM
|
||||||
|
ARG BUILD_VERSION
|
||||||
|
ARG BUILD_UPSTREAM="5.5-chromium-amd64-2022-09-18"
|
||||||
|
FROM ${BUILD_FROM}
|
||||||
|
|
||||||
|
##################
|
||||||
|
# 2 Modify Image #
|
||||||
|
##################
|
||||||
|
|
||||||
|
# Set S6 wait time
|
||||||
|
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||||
|
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||||
|
S6_SERVICES_GRACETIME=0
|
||||||
|
|
||||||
|
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/ /
|
||||||
|
|
||||||
|
# Corrects permissions for s6 v3
|
||||||
|
RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \
|
||||||
|
if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \
|
||||||
|
if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi
|
||||||
|
|
||||||
|
# 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 \
|
||||||
|
&& apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \
|
||||||
|
&& 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
|
||||||
|
# hadolint ignore=SC2015
|
||||||
|
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; \
|
||||||
|
if [ -f /etc/s6-overlay/s6-rc.d/init-migrations/run ]; then chmod +x /etc/cont-init.d/00-aaa_dockerfile_backup.sh && sed -i "1a /./etc/cont-init.d/00-aaa_dockerfile_backup.sh" /etc/s6-overlay/s6-rc.d/init-migrations/run;fi)
|
||||||
|
|
||||||
|
################
|
||||||
|
# 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}
|
||||||
53
omada_v3/README.md
Normal file
53
omada_v3/README.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# 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)
|
||||||
|
[](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
|
||||||
|
|
||||||
|
## Integration with HA
|
||||||
|
|
||||||
|
https://github.com/zachcheatham/ha-omada
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
Create an issue on github
|
||||||
|
|
||||||
|
## Illustration
|
||||||
|
|
||||||
|
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||||
65
omada_v3/apparmor.txt
Normal file
65
omada_v3/apparmor.txt
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
#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,
|
||||||
|
network unix dgram,
|
||||||
|
|
||||||
|
capability setgid,
|
||||||
|
capability setuid,
|
||||||
|
capability sys_admin,
|
||||||
|
capability dac_read_search,
|
||||||
|
# capability dac_override,
|
||||||
|
# capability sys_rawio,
|
||||||
|
|
||||||
|
# S6-Overlay
|
||||||
|
/init ix,
|
||||||
|
/run/{s6,s6-rc*,service}/** ix,
|
||||||
|
/package/** ix,
|
||||||
|
/command/** ix,
|
||||||
|
/run/{,**} rwk,
|
||||||
|
/dev/tty rw,
|
||||||
|
/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/nvme0 mrwkl,
|
||||||
|
/dev/nvme1 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,
|
||||||
|
|
||||||
|
}
|
||||||
9
omada_v3/build.json
Normal file
9
omada_v3/build.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"build_from": {
|
||||||
|
"aarch64": "mbentley/omada-controller:3.2-arm64",
|
||||||
|
"amd64": "mbentley/omada-controller:3.2-amd64"
|
||||||
|
},
|
||||||
|
"codenotary": {
|
||||||
|
"signer": "alexandrep.github@gmail.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
50
omada_v3/config.json
Normal file
50
omada_v3/config.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"arch": [
|
||||||
|
"aarch64",
|
||||||
|
"amd64"
|
||||||
|
],
|
||||||
|
"codenotary": "alexandrep.github@gmail.com",
|
||||||
|
"description": "TP-Link Omada Controller",
|
||||||
|
"environment": {
|
||||||
|
"MANAGE_HTTPS_PORT": "8043",
|
||||||
|
"MANAGE_HTTP_PORT": "8088",
|
||||||
|
"PORTAL_HTTPS_PORT": "8843",
|
||||||
|
"PORTAL_HTTP_PORT": "8088",
|
||||||
|
"SHOW_MONGODB_LOGS": "false",
|
||||||
|
"SHOW_SERVER_LOGS": "true",
|
||||||
|
"SSL_CERT_NAME": "tls.crt",
|
||||||
|
"SSL_KEY_NAME": "tls.key",
|
||||||
|
"TZ": "Etc/UTC"
|
||||||
|
},
|
||||||
|
"host_network": true,
|
||||||
|
"image": "ghcr.io/alexbelgium/omada_v3-{arch}",
|
||||||
|
"map": [
|
||||||
|
"config:rw",
|
||||||
|
"ssl:ro"
|
||||||
|
],
|
||||||
|
"name": "Omada v3.2",
|
||||||
|
"ports": {
|
||||||
|
"29810/udp": 29810,
|
||||||
|
"29811/tcp": 29811,
|
||||||
|
"29812/tcp": 29812,
|
||||||
|
"29813/tcp": 29813,
|
||||||
|
"29814/tcp": 29814,
|
||||||
|
"8043/tcp": 8043,
|
||||||
|
"8088/tcp": 8088,
|
||||||
|
"8843/tcp": 8843
|
||||||
|
},
|
||||||
|
"ports_description": {
|
||||||
|
"29810/udp": "device discovery port",
|
||||||
|
"29811/tcp": "legacy device discovery port",
|
||||||
|
"29812/tcp": "legacy device discovery port",
|
||||||
|
"29813/tcp": "legacy device upgrade port",
|
||||||
|
"29814/tcp": "device adoption port",
|
||||||
|
"8043/tcp": "web interface https",
|
||||||
|
"8088/tcp": "web interface http",
|
||||||
|
"8843/tcp": "portal https"
|
||||||
|
},
|
||||||
|
"slug": "omada_v3",
|
||||||
|
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||||
|
"version": "5.5-chromium-amd64-2022-09-18",
|
||||||
|
"webui": "[PROTO:ssl]://[HOST]:[PORT:8088]"
|
||||||
|
}
|
||||||
BIN
omada_v3/icon.png
Normal file
BIN
omada_v3/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
BIN
omada_v3/logo.png
Normal file
BIN
omada_v3/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
50
omada_v3/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh
Normal file
50
omada_v3/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/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 \
|
||||||
|
&& apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \
|
||||||
|
&& 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
|
||||||
|
|
||||||
|
if [ -e "/MODULESFILE" ] && [ ! -f /entrypoint.sh ]; then
|
||||||
|
for scripts in $MODULES; do
|
||||||
|
echo "$scripts : executing"
|
||||||
|
chown "$(id -u)":"$(id -g)" /etc/cont-init.d/"$scripts"
|
||||||
|
chmod a+x /etc/cont-init.d/"$scripts"
|
||||||
|
/./etc/cont-init.d/"$scripts" || echo "/etc/cont-init.d/$scripts: exiting $?"
|
||||||
|
rm /etc/cont-init.d/"$scripts"
|
||||||
|
done | tac
|
||||||
|
fi
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Correct permissions #
|
||||||
|
#######################
|
||||||
|
[ -d /etc/services.d ] && chmod -R 777 /etc/services.d
|
||||||
|
[ -d /etc/cont-init.d ] && chmod -R 777 /etc/cont-init.d
|
||||||
30
omada_v3/rootfs/etc/cont-init.d/00-folders.sh
Normal file
30
omada_v3/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
|
||||||
9
omada_v3/updater.json
Normal file
9
omada_v3/updater.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"dockerhub_by_date": true,
|
||||||
|
"last_update": "2022-09-18",
|
||||||
|
"repository": "alexbelgium/hassio-addons",
|
||||||
|
"slug": "omada_v3",
|
||||||
|
"source": "dockerhub",
|
||||||
|
"upstream_repo": "mbentley/omada-controller",
|
||||||
|
"upstream_version": "5.5-chromium-amd64-2022-09-18"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user