mirror of https://github.com/OpenIPC/firmware.git
[no ci] zt revert config location (#1539)
parent
80fcda87bd
commit
a0c9bacbd9
|
@ -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
|
||||
;;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
enabled=false
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue