Compare commits
22 Commits
@@ -1,6 +1,6 @@
|
||||
# MIT License
|
||||
|
||||
Copyright (c) 2019-2022 Franck Nijhof
|
||||
Copyright (c) 2019-2023 Franck Nijhof
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -80,7 +80,7 @@ our [GitHub Repository][repository].
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-2022 Franck Nijhof
|
||||
Copyright (c) 2019-2023 Franck Nijhof
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -121,7 +121,7 @@ SOFTWARE.
|
||||
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
|
||||
[issue]: https://github.com/hassio-addons/addon-zerotier/issues
|
||||
[license-shield]: https://img.shields.io/github/license/hassio-addons/addon-zerotier.svg
|
||||
[maintenance-shield]: https://img.shields.io/maintenance/yes/2022.svg
|
||||
[maintenance-shield]: https://img.shields.io/maintenance/yes/2023.svg
|
||||
[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png
|
||||
[patreon]: https://www.patreon.com/frenck
|
||||
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg
|
||||
|
||||
@@ -67,7 +67,7 @@ If you are more interested in stable releases of our add-ons:
|
||||
[forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-zerotier-one/109091?u=frenck
|
||||
[github-sponsors-shield]: https://frenck.dev/wp-content/uploads/2019/12/github_sponsor.png
|
||||
[github-sponsors]: https://github.com/sponsors/frenck
|
||||
[maintenance-shield]: https://img.shields.io/maintenance/yes/2022.svg
|
||||
[maintenance-shield]: https://img.shields.io/maintenance/yes/2023.svg
|
||||
[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png
|
||||
[patreon]: https://www.patreon.com/frenck
|
||||
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg
|
||||
|
||||
@@ -26,12 +26,6 @@ comparison to installing any other Home Assistant add-on.
|
||||
1. Check the logs of the "ZeroTier One" add-on to see if everything went well.
|
||||
1. The instance will show up in your ZeroTier account.
|
||||
|
||||
Home Assistant, by default, ships with the Community Add-ons store installed.
|
||||
However, if it is missing (for any reason), you can add it by clicking the
|
||||
button My button below.
|
||||
|
||||
[!Add repository to your Home Assitant instance.][repository-badge]][repository]
|
||||
|
||||
## Configuration
|
||||
|
||||
**Note**: _Remember to restart the add-on when the configuration is changed._
|
||||
@@ -124,7 +118,7 @@ check [the contributor's page][contributors].
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-2022 Franck Nijhof
|
||||
Copyright (c) 2019-2023 Franck Nijhof
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -145,7 +139,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
[addon-badge]: https://my.home-assistant.io/badges/supervisor_addon.svg
|
||||
[addon]: https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_zerotier
|
||||
[addon]: https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_zerotier&repository_url=https%3A%2F%2Fgithub.com%2Fhassio-addons%2Frepository
|
||||
[api]: https://www.zerotier.com/manual.shtml#4_1
|
||||
[contributors]: https://github.com/hassio-addons/addon-zerotier/graphs/contributors
|
||||
[discord-ha]: https://discord.gg/c5DvZ4e
|
||||
@@ -155,7 +149,5 @@ SOFTWARE.
|
||||
[issue]: https://github.com/hassio-addons/addon-zerotier/issues
|
||||
[reddit]: https://reddit.com/r/homeassistant
|
||||
[releases]: https://github.com/hassio-addons/addon-zerotier/releases
|
||||
[repository-badge]: https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg
|
||||
[repository]: https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fhassio-addons%2Frepository
|
||||
[semver]: http://semver.org/spec/v2.0.0.htm
|
||||
[zerotier]: https://www.zerotier.com/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:11.1.0
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base:13.1.3
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
@@ -9,22 +9,22 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# hadolint ignore=DL3003
|
||||
RUN \
|
||||
apk add --no-cache --virtual .build-dependencies \
|
||||
build-base=0.5-r2 \
|
||||
cargo=1.56.1-r0 \
|
||||
git=2.34.1-r0 \
|
||||
linux-headers=5.10.41-r0 \
|
||||
openssl-dev=1.1.1l-r8 \
|
||||
pkgconf=1.8.0-r0 \
|
||||
build-base=0.5-r3 \
|
||||
cargo=1.64.0-r2 \
|
||||
git=2.38.4-r1 \
|
||||
linux-headers=5.19.5-r0 \
|
||||
openssl-dev=3.0.8-r0 \
|
||||
pkgconf=1.9.4-r0 \
|
||||
\
|
||||
&& apk add --no-cache \
|
||||
libgcc=10.3.1_git20211027-r0 \
|
||||
libstdc++=10.3.1_git20211027-r0 \
|
||||
libgcc=12.2.1_git20220924-r4 \
|
||||
libstdc++=12.2.1_git20220924-r4 \
|
||||
\
|
||||
&& git clone --branch "1.8.6" --depth=1 \
|
||||
&& git clone --branch "1.10.4" --depth=1 \
|
||||
"https://github.com/zerotier/ZeroTierOne.git" /tmp/zerotier \
|
||||
\
|
||||
&& cd /tmp/zerotier \
|
||||
&& make \
|
||||
&& CARGO_NET_GIT_FETCH_WITH_CLI=true make \
|
||||
&& make install \
|
||||
\
|
||||
&& apk del --no-cache --purge .build-dependencies \
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
build_from:
|
||||
aarch64: ghcr.io/hassio-addons/base/aarch64:11.1.0
|
||||
amd64: ghcr.io/hassio-addons/base/amd64:11.1.0
|
||||
armhf: ghcr.io/hassio-addons/base/armhf:11.1.0
|
||||
armv7: ghcr.io/hassio-addons/base/armv7:11.1.0
|
||||
i386: ghcr.io/hassio-addons/base/i386:11.1.0
|
||||
aarch64: ghcr.io/hassio-addons/base:13.1.3
|
||||
amd64: ghcr.io/hassio-addons/base:13.1.3
|
||||
armhf: ghcr.io/hassio-addons/base:13.1.3
|
||||
armv7: ghcr.io/hassio-addons/base:13.1.3
|
||||
i386: ghcr.io/hassio-addons/base:13.1.3
|
||||
codenotary:
|
||||
base_image: codenotary@frenck.dev
|
||||
signer: codenotary@frenck.dev
|
||||
|
||||
5
zerotier/rootfs/etc/cont-init.d/zerotier.sh → zerotier/rootfs/etc/s6-overlay/s6-rc.d/init-zerotier/run
Normal file → Executable file
5
zerotier/rootfs/etc/cont-init.d/zerotier.sh → zerotier/rootfs/etc/s6-overlay/s6-rc.d/init-zerotier/run
Normal file → Executable file
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Generates an identiy in case it does not exists yet
|
||||
@@ -42,7 +43,7 @@ bashio::log.info "ZeroTier node address: ${node}"
|
||||
# Sets the auth token for the local JSON API
|
||||
if bashio::config.has_value 'api_auth_token'; then
|
||||
token=$(bashio::config 'api_auth_token')
|
||||
echo "${token}" > /data/authtoken.secret
|
||||
echo "${token}" > /var/lib/zerotier-one/authtoken.secret
|
||||
fi
|
||||
|
||||
# Ensure network folder exists
|
||||
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
1
zerotier/rootfs/etc/s6-overlay/s6-rc.d/init-zerotier/up
Normal file
1
zerotier/rootfs/etc/s6-overlay/s6-rc.d/init-zerotier/up
Normal file
@@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-zerotier/run
|
||||
27
zerotier/rootfs/etc/s6-overlay/s6-rc.d/zerotier/finish
Executable file
27
zerotier/rootfs/etc/s6-overlay/s6-rc.d/zerotier/finish
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Take down the S6 supervision tree when ZeroTier fails
|
||||
# ==============================================================================
|
||||
declare exit_code
|
||||
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
|
||||
readonly exit_code_service="${1}"
|
||||
readonly exit_code_signal="${2}"
|
||||
readonly service="ZeroTier One"
|
||||
|
||||
bashio::log.info \
|
||||
"Service ${service} exited with code ${exit_code_service}" \
|
||||
"(by signal ${exit_code_signal})"
|
||||
|
||||
if [[ "${exit_code_service}" -eq 256 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
|
||||
elif [[ "${exit_code_service}" -ne 0 ]]; then
|
||||
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
|
||||
fi
|
||||
exec /run/s6/basedir/bin/halt
|
||||
fi
|
||||
3
zerotier/rootfs/etc/services.d/zerotier/run → zerotier/rootfs/etc/s6-overlay/s6-rc.d/zerotier/run
Normal file → Executable file
3
zerotier/rootfs/etc/services.d/zerotier/run → zerotier/rootfs/etc/s6-overlay/s6-rc.d/zerotier/run
Normal file → Executable file
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Runs ZeroTier One
|
||||
1
zerotier/rootfs/etc/s6-overlay/s6-rc.d/zerotier/type
Normal file
1
zerotier/rootfs/etc/s6-overlay/s6-rc.d/zerotier/type
Normal file
@@ -0,0 +1 @@
|
||||
longrun
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/execlineb -S0
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Take down the S6 supervision tree when ZeroTier fails
|
||||
# ==============================================================================
|
||||
if -n { s6-test $# -ne 0 }
|
||||
if -n { s6-test ${1} -eq 256 }
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
||||
Reference in New Issue
Block a user