This commit is contained in:
Alexandre Pary
2021-06-23 17:16:03 +02:00
parent b46bf1bf5a
commit bdb404ad0f
7 changed files with 202 additions and 0 deletions

58
inadyn/Dockerfile Normal file
View File

@@ -0,0 +1,58 @@
FROM troglobit/inadyn:latest
# Base system
ARG BASHIO_VERSION=0.13.0
ARG TEMPIO_VERSION=2021.01.0
ARG BUILD_ARCH
RUN \
################
# Install apps #
################
apk add --no-cache \
curl \
jq \
\
##################
# Install bashio #
##################
&& mkdir -p /tmp/bashio \
&& curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \
| tar -xzf - --strip 1 -C /tmp/bashio \
&& mv /tmp/bashio/lib /usr/lib/bashio \
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
&& rm -rf /tmp/bashio
# Copy root filesystem
COPY rootfs /
CMD ["/run.sh"]
VOLUME [ "/data" ]
### 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}

1
inadyn/README.md Normal file
View File

@@ -0,0 +1 @@
# Inadyn addon for hass.io

8
inadyn/build.json Normal file
View File

@@ -0,0 +1,8 @@
{
"build_from": {
"armv7": "troglobit/inadyn:latest",
"armhf": "troglobit/inadyn:latest",
"aarch64": "troglobit/inadyn:latest",
"amd64": "troglobit/inadyn:latest"
}
}

59
inadyn/config.json Normal file
View File

@@ -0,0 +1,59 @@
{
"name": "Inadyn",
"version": "2.8.1",
"upstream": "2.8.1",
"slug": "inadyn",
"description": "Inadyn is a small and simple Dynamic DNS, DDNS, client with HTTPS support. A large number of dynamic dns providers are supported (https://github.com/troglobit/inadyn#supported-providers). For those that are not, you can use a custom provider as per this project's documentation (https://github.com/nalipaz/hassio-addons/blob/master/README.md)",
"url": "https://github.com/alexbelgium/hassio-addons",
"arch": [
"aarch64",
"amd64",
"armv7",
"armhf"
],
"map": [
"ssl"
],
"host_network": true,
"environment": {
},
"options": {
"providers": [
{
"provider": "yourprovider",
"username": "username",
"password": "password",
"hostname": "dynamic-subdomain.example.com"
}
]
},
"schema": {
"verify_address": "bool?",
"fake_address": "bool?",
"allow_ipv6": "bool?",
"iface": "str?",
"iterations": "int?",
"period": "int?",
"forced_update": "bool?",
"secure_ssl": "bool?",
"providers": [
{
"provider": "str",
"custom_provider": "bool?",
"username": "str",
"password": "str?",
"ssl": "bool?",
"hostname": "str",
"checkip_ssl": "bool?",
"checkip_server": "str?",
"checkip_command": "str?",
"checkip_path": "str?",
"user_agent": "str?",
"wildcard": "bool?",
"ddns_server": "str?",
"ddns_path": "str?",
"append_myip": "bool?"
}
]
}
}

48
inadyn/rootfs/run.sh Normal file
View File

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# ==============================================================================
# Home Assistant Community Add-on: Base Images
# Displays a simple add-on banner on startup
# ==============================================================================
if bashio::supervisor.ping; then
bashio::log.blue \
'-----------------------------------------------------------'
bashio::log.blue " Add-on: $(bashio::addon.name)"
bashio::log.blue " $(bashio::addon.description)"
bashio::log.blue \
'-----------------------------------------------------------'
bashio::log.blue " Add-on version: $(bashio::addon.version)"
if bashio::var.true "$(bashio::addon.update_available)"; then
bashio::log.magenta ' There is an update available for this add-on!'
bashio::log.magenta \
" Latest add-on version: $(bashio::addon.version_latest)"
bashio::log.magenta ' Please consider upgrading as soon as possible.'
else
bashio::log.green ' You are running the latest version of this add-on.'
fi
bashio::log.blue " System: $(bashio::info.operating_system)" \
" ($(bashio::info.arch) / $(bashio::info.machine))"
bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)"
bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)"
bashio::log.blue \
'-----------------------------------------------------------'
bashio::log.blue \
' Please, share the above information when looking for help'
bashio::log.blue \
' or support in, e.g., GitHub, forums or the Discord chat.'
bashio::log.blue \
' https://github.com/alexbelgium/hassio-addons'
bashio::log.blue \
'-----------------------------------------------------------'
fi
# ==============================================================================
# Launch
# Launch
# ==============================================================================
mustache-cli /data/options.json /templates/inadyn.mustache > /usr/local/etc/inadyn.conf
/usr/local/sbin/inadyn --foreground

View File

@@ -0,0 +1,28 @@
# Inadyn v2.0 configuration file format{{#verify_address}}
verify-address = {{verify_address}}{{/verify_address}}{{#fake_address}}
fake-address = {{fake_address}}{{/fake_address}}{{#allow_ipv6}}
allow-ipv6 = {{allow_ipv6}}{{/allow_ipv6}}{{#iface}}
iface = "{{iface}}"{{/iface}}{{#iterations}}
iterations = {{iterations}}{{/iterations}}{{#period}}
period = {{period}}{{/period}}{{#forced_update}}
forced-update = {{forced_update}}{{/forced_update}}{{#secure_ssl}}
secure-ssl = {{secure_ssl}}{{/secure_ssl}}{{#user_agent}}
user-agent = {{user_agent}}{{/user_agent}}
{{#providers}}
{{#custom_provider}}custom{{/custom_provider}}{{^custom_provider}}provider{{/custom_provider}} {{provider}} {
username = "{{username}}"{{#password}}
password = "{{password}}"{{/password}}{{#ssl}}
ssl = {{ssl}}{{/ssl}}
hostname = "{{hostname}}"{{#checkip_ssl}}
checkip-ssl = {{checkip_ssl}}{{/checkip_ssl}}{{#checkip_server}}
checkip-server = "{{checkip_server}}"{{/checkip_server}}{{#checkip_command}}
checkip-command = "{{checkip_command}}"{{/checkip_command}}{{#checkip_path}}
checkip-path = "{{checkip_path}}"{{/checkip_path}}{{#user_agent}}
user-agent = "{{user_agent}}"{{/user_agent}}{{#wildcard}}
wildcard = "{{wildcard}}"{{/wildcard}}{{#ddns_server}}
ddns-server = "{{ddns_server}}"{{/ddns_server}}{{#ddns_path}}
ddns-path = "{{ddns_path}}"{{/ddns_path}}{{#append_myip}}
append-myip = "{{append_myip}}"{{/append_myip}}
}
{{/providers}}

View File