[no ci] zt revert config location (#1539)

pull/1540/head
cronyx 2024-08-27 22:14:26 +03:00 committed by GitHub
parent 80fcda87bd
commit a0c9bacbd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 9 deletions

View File

@ -1,18 +1,17 @@
#!/bin/sh
config_file=/etc/webui/zerotier.conf
if [ -e "$config_file" ]; then
. $config_file
if [ -e /etc/zerotier.conf ]; then
. /etc/zerotier.conf
fi
case "$1" in
start)
if [ "$zerotier_enabled" = "true" ]; then
if [ "$enabled" = "true" ]; then
echo "Starting zerotier-one daemon..."
modprobe tun
zerotier-one -d
else
echo "Zerotier-One service is disabled in ${config_file}."
echo "Zerotier-One service is disabled in /etc/zerotier.conf."
exit 1
fi
;;

View File

@ -0,0 +1 @@
enabled=false

View File

@ -26,10 +26,11 @@ endef
define ZEROTIER_ONE_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
if grep -q "BR2_PACKAGE_WEBUI=y" $(BR2_CONFIG); then \
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d ; \
cp $(ZEROTIER_ONE_PKGDIR)/files/S90zerotier $(TARGET_DIR)/etc/init.d ; \
fi
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc
cp $(ZEROTIER_ONE_PKGDIR)/files/zerotier.conf $(TARGET_DIR)/etc/zerotier.conf
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d
cp $(ZEROTIER_ONE_PKGDIR)/files/S90zerotier $(TARGET_DIR)/etc/init.d
endef
$(eval $(generic-package))