diff --git a/LingTiGameAcc/Makefile b/LingTiGameAcc/Makefile new file mode 100644 index 0000000..792c19b --- /dev/null +++ b/LingTiGameAcc/Makefile @@ -0,0 +1,56 @@ +# +# Copyright (C) 2015-2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v3. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=LingTiGameAcc +PKG_VERSION:=2021 +PKG_RELEASE:=1.4.4 + +PKG_LICENSE:=GPLv3 +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=eSir Playground + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + CATEGORY:=eSir Playground + SUBMENU:=2. GameAcc + TITLE:=LingTi Game Accelerator + URL:=https://github.com/esirplayground/LingTiGameAcc + DEPENDS:=+kmod-tun +endef + +define Package/$(PKG_NAME)/description +LingTi Game Acc is a Game Accelerator which is paid service. +endef + +DIR_ARCH:=$(ARCH) + +define Build/Prepare + mkdir $(PKG_BUILD_DIR)/$(PKG_NAME) + cp -r ./files/$(DIR_ARCH)/* $(PKG_BUILD_DIR)/$(PKG_NAME)/lingti +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)/lingti $(1)/usr/bin + + + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./root/etc/init.d/lingti $(1)/etc/init.d +endef + +define Package/$(PKG_NAME)/postinst +#!/bin/sh +chmod +x $(1)/usr/bin/lingti +chmod +x $(1)/etc/init.d/lingti +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/LingTiGameAcc/README.md b/LingTiGameAcc/README.md new file mode 100644 index 0000000..b577c57 --- /dev/null +++ b/LingTiGameAcc/README.md @@ -0,0 +1,3 @@ +# LingTiGameAcc + +This Tools can be functioning `independently` without luci app. diff --git a/LingTiGameAcc/files/aarch64/lingti b/LingTiGameAcc/files/aarch64/lingti new file mode 100755 index 0000000..ccadfb6 Binary files /dev/null and b/LingTiGameAcc/files/aarch64/lingti differ diff --git a/LingTiGameAcc/files/arm/lingti b/LingTiGameAcc/files/arm/lingti new file mode 100755 index 0000000..10abe8f Binary files /dev/null and b/LingTiGameAcc/files/arm/lingti differ diff --git a/LingTiGameAcc/files/mips/lingti b/LingTiGameAcc/files/mips/lingti new file mode 100755 index 0000000..288cdd4 Binary files /dev/null and b/LingTiGameAcc/files/mips/lingti differ diff --git a/LingTiGameAcc/files/mipsel/lingti b/LingTiGameAcc/files/mipsel/lingti new file mode 100755 index 0000000..7bf3668 Binary files /dev/null and b/LingTiGameAcc/files/mipsel/lingti differ diff --git a/LingTiGameAcc/files/x86_64/lingti b/LingTiGameAcc/files/x86_64/lingti new file mode 100755 index 0000000..23a5f90 Binary files /dev/null and b/LingTiGameAcc/files/x86_64/lingti differ diff --git a/LingTiGameAcc/root/etc/init.d/lingti b/LingTiGameAcc/root/etc/init.d/lingti new file mode 100755 index 0000000..d0461fa --- /dev/null +++ b/LingTiGameAcc/root/etc/init.d/lingti @@ -0,0 +1,28 @@ +#!/bin/sh /etc/rc.common + +START=99 + +[ -d /var/bin ] || mkdir -p /var/bin +[ -f /var/bin/lingti ] || cp /usr/bin/lingti /var/bin/lingti + +start() { + state=`pgrep -f "/var/bin/lingti"` + if [ ! -z "$state" ]; then + restart + else + /var/bin/lingti & + fi + echo "LingTiGameAcc Started..." +} + +stop() { + kill -9 `pgrep -f "/var/bin/lingti"` 2>/dev/null + echo "LingTiGameAcc Stopped ..." +} + +restart() { + stop + sleep 1 + start + echo "Restarted." +} \ No newline at end of file