Merge pull request #1413 from NeoTheFox/dev

Add ZeroTier
This commit is contained in:
fewtarius 2023-05-11 06:50:11 -04:00 committed by GitHub
commit 0c6cd68308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 69 additions and 0 deletions

View file

@ -97,6 +97,7 @@ show_config() {
config_message="${config_message}\n - SFTP server support:\t\t\t $SFTP_SERVER"
config_message="${config_message}\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT"
config_message="${config_message}\n - WireGuard support:\t\t\t $WIREGUARD_SUPPORT"
config_message="${config_message}\n - ZeroTier support:\t\t\t $ZEROTIER_SUPPORT"
# OS configuration

View file

@ -0,0 +1,3 @@
STATE=$(get_setting zerotier.up)
SVC="zerotier-one"
DAEMONS=("zerotier-one")

View file

@ -0,0 +1,33 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-present kkoshelev (https://github.com/kkoshelev)
# Copyright (C) 2022-present fewtarius (https://github.com/fewtarius)
# Copyright (C) 2023-present NeoTheFox (https://github.com/NeoTheFox)
PKG_NAME="zerotier-one"
PKG_VERSION="1.10.6"
PKG_SITE="https://www.zerotier.com"
PKG_URL="https://github.com/zerotier/ZeroTierOne/archive/refs/tags/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain nlohmann-json"
PKG_SHORTDESC="A Smart Ethernet Switch for Earth"
PKG_TOOLCHAIN="manual"
pre_unpack() {
mkdir -p ${PKG_BUILD}
tar --strip-components=1 -xf $SOURCES/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.gz -C ${PKG_BUILD} ZeroTierOne-${PKG_VERSION}
}
make_target() {
cd ${PKG_BUILD}
make -f make-linux.mk ZT_SSO_SUPPORTED=0 one
}
makeinstall_target() {
make DESTDIR=${INSTALL} install
rm -rf ${INSTALL}/usr/share/man/
mkdir -p ${INSTALL}/usr/lib/systemd/system
cp -R ${PKG_DIR}/system.d/zerotier-one.service ${INSTALL}/usr/lib/systemd/system/
}

View file

@ -0,0 +1,13 @@
[Unit]
Description=zerotier-one
Wants=network-pre.target
After=network-pre.target
[Service]
ExecStart=/usr/sbin/zerotier-one
Restart=always
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target

View file

@ -27,6 +27,10 @@ if [ "${WIREGUARD_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} wireguard-tools"
fi
if [ "${ZEROTIER_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} zerotier-one"
fi
# nss needed by inputstream.adaptive, chromium etc.
if [ "${TARGET_ARCH}" = "x86_64" ] || [ "${TARGET_ARCH}" = "arm" ]; then
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} nss"

View file

@ -122,6 +122,9 @@
# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"
# build and install ZeroTier support (yes / no)
ZEROTIER_SUPPORT="yes"
# build and install diskmounter support (udevil)
# this service provide auto mounting support for external drives in the
# mediacenter also automount internally drives at boottime via udev (yes / no)

View file

@ -96,6 +96,9 @@
# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"
# build and install ZeroTier support (yes / no)
ZEROTIER_SUPPORT="yes"
# build and install diskmounter support (udevil)
# this service provide auto mounting support for external drives in the
# mediacenter also automount internally drives at boottime via udev (yes / no)

View file

@ -114,6 +114,9 @@
# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"
# build and install ZeroTier support (yes / no)
ZEROTIER_SUPPORT="yes"
# build and install diskmounter support (udevil)
# this service provide auto mounting support for external drives in the
# mediacenter also automount internally drives at boottime via udev (yes / no)

View file

@ -114,6 +114,9 @@
# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"
# build and install ZeroTier support (yes / no)
ZEROTIER_SUPPORT="yes"
# build and install diskmounter support (udevil)
# this service provide auto mounting support for external drives in the
# mediacenter also automount internally drives at boottime via udev (yes / no)

View file

@ -123,6 +123,9 @@
# build and install OpenVPN support (yes / no)
OPENVPN_SUPPORT="no"
# build and install ZeroTier support (yes / no)
ZEROTIER_SUPPORT="yes"
# build and install diskmounter support (udevil)
# this service provide auto mounting support for external drives in the
# mediacenter also automount internally drives at boottime via udev (yes / no)