Compare commits
59 Commits
8
.github/dependabot.yaml
vendored
8
.github/dependabot.yaml
vendored
@@ -1,8 +0,0 @@
|
||||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "06:00"
|
||||
59
.github/renovate.json
vendored
Normal file
59
.github/renovate.json
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"dependencyDashboard": true,
|
||||
"labels": ["dependencies", "no-stale"],
|
||||
"commitMessagePrefix": "⬆️",
|
||||
"commitMessageTopic": "{{depName}}",
|
||||
"regexManagers": [
|
||||
{
|
||||
"fileMatch": ["/Dockerfile$", "/build.yaml$"],
|
||||
"matchStringsStrategy": "any",
|
||||
"matchStrings": [
|
||||
"ARG BUILD_FROM=(?<depName>.*?):(?<currentValue>.*?)\\s+",
|
||||
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
|
||||
],
|
||||
"datasourceTemplate": "docker"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["/Dockerfile$"],
|
||||
"matchStringsStrategy": "any",
|
||||
"matchStrings": [
|
||||
"\\s\\s(?<package>[a-z0-9-]+)=(?<currentValue>[a-z0-9-_.]+)\\s+"
|
||||
],
|
||||
"versioningTemplate": "loose",
|
||||
"datasourceTemplate": "repology",
|
||||
"depNameTemplate": "alpine_3_18/{{package}}"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["/Dockerfile$"],
|
||||
"matchStrings": [
|
||||
"ARG ZERO_TIER_ONE_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
|
||||
],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "zerotier/ZeroTierOne"
|
||||
}
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchDatasources": ["repology"],
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"groupName": "Add-on base image",
|
||||
"matchDatasources": ["docker"]
|
||||
},
|
||||
{
|
||||
"groupName": "Add-on base image",
|
||||
"matchDatasources": ["docker"],
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"matchDatasources": ["github-releases"],
|
||||
"matchDepNames": ["zerotier/ZeroTierOne"],
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
||||
1
.github/workflows/deploy.yaml
vendored
1
.github/workflows/deploy.yaml
vendored
@@ -16,5 +16,4 @@ jobs:
|
||||
workflows:
|
||||
uses: hassio-addons/workflows/.github/workflows/addon-deploy.yaml@main
|
||||
secrets:
|
||||
CAS_API_KEY: ${{ secrets.CAS_API_KEY }}
|
||||
DISPATCH_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# MIT License
|
||||
|
||||
Copyright (c) 2019-2022 Franck Nijhof
|
||||
Copyright (c) 2019-2024 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-2024 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
|
||||
@@ -102,7 +102,7 @@ SOFTWARE.
|
||||
|
||||
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
|
||||
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
|
||||
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
|
||||
[armhf-shield]: https://img.shields.io/badge/armhf-no-red.svg
|
||||
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
|
||||
[commits-shield]: https://img.shields.io/github/commit-activity/y/hassio-addons/addon-zerotier.svg
|
||||
[commits]: https://github.com/hassio-addons/addon-zerotier/commits/main
|
||||
@@ -118,10 +118,10 @@ SOFTWARE.
|
||||
[github-actions]: https://github.com/hassio-addons/addon-zerotier/actions
|
||||
[github-sponsors-shield]: https://frenck.dev/wp-content/uploads/2019/12/github_sponsor.png
|
||||
[github-sponsors]: https://github.com/sponsors/frenck
|
||||
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
|
||||
[i386-shield]: https://img.shields.io/badge/i386-no-red.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/2024.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/2024.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
|
||||
|
||||
@@ -118,7 +118,7 @@ check [the contributor's page][contributors].
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-2022 Franck Nijhof
|
||||
Copyright (c) 2019-2024 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
|
||||
@@ -149,5 +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
|
||||
[semver]: http://semver.org/spec/v2.0.0.htm
|
||||
[semver]: https://semver.org/spec/v2.0.0.html
|
||||
[zerotier]: https://www.zerotier.com/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:12.0.0
|
||||
ARG BUILD_FROM=ghcr.io/hassio-addons/base:15.0.3
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
@@ -6,21 +6,22 @@ FROM ${BUILD_FROM}
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Setup base
|
||||
ARG ZERO_TIER_ONE_VERSION="1.12.2"
|
||||
# hadolint ignore=DL3003
|
||||
RUN \
|
||||
apk add --no-cache --virtual .build-dependencies \
|
||||
build-base=0.5-r2 \
|
||||
cargo=1.60.0-r2 \
|
||||
git=2.36.1-r0 \
|
||||
linux-headers=5.16.7-r1 \
|
||||
openssl-dev=1.1.1o-r0 \
|
||||
pkgconf=1.8.0-r0 \
|
||||
build-base=0.5-r3 \
|
||||
cargo=1.72.1-r0 \
|
||||
git=2.43.0-r0 \
|
||||
linux-headers=6.5-r0 \
|
||||
openssl-dev=3.1.4-r2 \
|
||||
pkgconf=2.1.0-r0 \
|
||||
\
|
||||
&& apk add --no-cache \
|
||||
libgcc=11.2.1_git20220219-r2 \
|
||||
libstdc++=11.2.1_git20220219-r2 \
|
||||
libgcc=13.2.1_git20231014-r0 \
|
||||
libstdc++=13.2.1_git20231014-r0 \
|
||||
\
|
||||
&& git clone --branch "1.10.0" --depth=1 \
|
||||
&& git clone --branch "${ZERO_TIER_ONE_VERSION}" --depth=1 \
|
||||
"https://github.com/zerotier/ZeroTierOne.git" /tmp/zerotier \
|
||||
\
|
||||
&& cd /tmp/zerotier \
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
---
|
||||
build_from:
|
||||
aarch64: ghcr.io/hassio-addons/base/aarch64:12.0.0
|
||||
amd64: ghcr.io/hassio-addons/base/amd64:12.0.0
|
||||
armhf: ghcr.io/hassio-addons/base/armhf:12.0.0
|
||||
armv7: ghcr.io/hassio-addons/base/armv7:12.0.0
|
||||
i386: ghcr.io/hassio-addons/base/i386:12.0.0
|
||||
aarch64: ghcr.io/hassio-addons/base:15.0.3
|
||||
amd64: ghcr.io/hassio-addons/base:15.0.3
|
||||
armv7: ghcr.io/hassio-addons/base:15.0.3
|
||||
codenotary:
|
||||
base_image: codenotary@frenck.dev
|
||||
signer: codenotary@frenck.dev
|
||||
|
||||
@@ -10,9 +10,7 @@ init: false
|
||||
arch:
|
||||
- aarch64
|
||||
- amd64
|
||||
- armhf
|
||||
- armv7
|
||||
- i386
|
||||
ports:
|
||||
9993/tcp: 9993
|
||||
ports_description:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Generates an identiy in case it does not exists yet
|
||||
@@ -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
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/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,11 +0,0 @@
|
||||
#!/command/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: ZeroTier One
|
||||
# Take down the S6 supervision tree when ZeroTier fails
|
||||
# ==============================================================================
|
||||
if [[ "${1}" -ne 0 ]] && [[ "${1}" -ne 256 ]]; then
|
||||
bashio::log.warning "ZeroTier crashed, halting add-on"
|
||||
/run/s6/basedir/bin/halt
|
||||
fi
|
||||
|
||||
bashio::log.info "ZeroTier stopped, restarting..."
|
||||
Reference in New Issue
Block a user