[no ci] zt revert config location

pull/1539/head
cronyx 2024-08-27 22:13:19 +03:00
parent 80fcda87bd
commit c0d09599d9
3 changed files with 10 additions and 9 deletions

View File

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

View File

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

View File

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