From 4f80e7988669157049ef0fa969924e447d4d11f7 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 26 Apr 2022 15:04:19 -0700 Subject: [PATCH] Add QNAP build scripts --- pkg/qnap/Dockerfile | 8 + pkg/qnap/build.sh | 13 ++ pkg/qnap/entrypoint.sh | 76 +++++++++ pkg/qnap/qdk.conf | 3 + pkg/qnap/zerotier/Makefile | 7 + pkg/qnap/zerotier/arm_64/.gitkeep | 0 pkg/qnap/zerotier/arm_x09/.gitkeep | 0 pkg/qnap/zerotier/arm_x10/.gitkeep | 0 pkg/qnap/zerotier/arm_x12/.gitkeep | 0 pkg/qnap/zerotier/arm_x19/.gitkeep | 0 pkg/qnap/zerotier/arm_x31/.gitkeep | 0 pkg/qnap/zerotier/arm_x41/.gitkeep | 0 pkg/qnap/zerotier/config/.gitkeep | 0 pkg/qnap/zerotier/icons/.gitkeep | 0 pkg/qnap/zerotier/icons/ZeroTier.gif | Bin 0 -> 2765 bytes pkg/qnap/zerotier/icons/ZeroTier_80.gif | Bin 0 -> 2765 bytes pkg/qnap/zerotier/icons/ZeroTier_gray.gif | Bin 0 -> 1986 bytes pkg/qnap/zerotier/package_routines | 158 +++++++++++++++++++ pkg/qnap/zerotier/qpkg.cfg | 99 ++++++++++++ pkg/qnap/zerotier/shared/.gitkeep | 0 pkg/qnap/zerotier/shared/.qpkg_icon.gif | Bin 0 -> 1853 bytes pkg/qnap/zerotier/shared/.qpkg_icon_80.gif | Bin 0 -> 1853 bytes pkg/qnap/zerotier/shared/.qpkg_icon_gray.gif | Bin 0 -> 2375 bytes pkg/qnap/zerotier/shared/zerotier.sh | 34 ++++ pkg/qnap/zerotier/x86/.gitkeep | 0 pkg/qnap/zerotier/x86_64/.gitkeep | 0 pkg/qnap/zerotier/x86_ce53xx/.gitkeep | 0 27 files changed, 398 insertions(+) create mode 100644 pkg/qnap/Dockerfile create mode 100755 pkg/qnap/build.sh create mode 100755 pkg/qnap/entrypoint.sh create mode 100644 pkg/qnap/qdk.conf create mode 100644 pkg/qnap/zerotier/Makefile create mode 100644 pkg/qnap/zerotier/arm_64/.gitkeep create mode 100644 pkg/qnap/zerotier/arm_x09/.gitkeep create mode 100644 pkg/qnap/zerotier/arm_x10/.gitkeep create mode 100644 pkg/qnap/zerotier/arm_x12/.gitkeep create mode 100644 pkg/qnap/zerotier/arm_x19/.gitkeep create mode 100644 pkg/qnap/zerotier/arm_x31/.gitkeep create mode 100644 pkg/qnap/zerotier/arm_x41/.gitkeep create mode 100644 pkg/qnap/zerotier/config/.gitkeep create mode 100644 pkg/qnap/zerotier/icons/.gitkeep create mode 100644 pkg/qnap/zerotier/icons/ZeroTier.gif create mode 100644 pkg/qnap/zerotier/icons/ZeroTier_80.gif create mode 100644 pkg/qnap/zerotier/icons/ZeroTier_gray.gif create mode 100644 pkg/qnap/zerotier/package_routines create mode 100644 pkg/qnap/zerotier/qpkg.cfg create mode 100644 pkg/qnap/zerotier/shared/.gitkeep create mode 100644 pkg/qnap/zerotier/shared/.qpkg_icon.gif create mode 100644 pkg/qnap/zerotier/shared/.qpkg_icon_80.gif create mode 100644 pkg/qnap/zerotier/shared/.qpkg_icon_gray.gif create mode 100755 pkg/qnap/zerotier/shared/zerotier.sh create mode 100644 pkg/qnap/zerotier/x86/.gitkeep create mode 100644 pkg/qnap/zerotier/x86_64/.gitkeep create mode 100644 pkg/qnap/zerotier/x86_ce53xx/.gitkeep diff --git a/pkg/qnap/Dockerfile b/pkg/qnap/Dockerfile new file mode 100644 index 000000000..3deb161cb --- /dev/null +++ b/pkg/qnap/Dockerfile @@ -0,0 +1,8 @@ +# vim: ft=dockerfile + +FROM ubuntu:20.04 + +# COPY zerotier/qbuild /qbuild + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/pkg/qnap/build.sh b/pkg/qnap/build.sh new file mode 100755 index 000000000..6d4f4d0b5 --- /dev/null +++ b/pkg/qnap/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +build_packages() +{ + sudo docker run -v $(pwd):/zto ztqnap +} + +build_container() +{ + sudo docker build -t ztqnap . --load +} + +"$@" diff --git a/pkg/qnap/entrypoint.sh b/pkg/qnap/entrypoint.sh new file mode 100755 index 000000000..d236a5429 --- /dev/null +++ b/pkg/qnap/entrypoint.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +ZTO_VER=$(git describe --abbrev=0 --tags) +ZTO_COMMIT=$(git rev-parse HEAD) +ZTO_DESC=$(jq -r '.desc' ../config.json) + +mkdir -p pkg/qnap/zerotier/arm_64 +mkdir -p pkg/qnap/zerotier/arm_x09 +mkdir -p pkg/qnap/zerotier/arm_x10 +mkdir -p pkg/qnap/zerotier/arm_x12 +mkdir -p pkg/qnap/zerotier/arm_x19 +mkdir -p pkg/qnap/zerotier/arm_x31 +mkdir -p pkg/qnap/zerotier/arm_x41 +mkdir -p pkg/qnap/zerotier/x86_64 +mkdir -p pkg/qnap/zerotier/x86 +mkdir -p pkg/qnap/zerotier/x86_ce53xx + +cat > pkg/qnap/zerotier/qpkg.cfg <<- EOM +# Update package config +# Name of the packaged application. +QPKG_NAME="zerotier" +# Name of the display application. +QPKG_DISPLAY_NAME="ZeroTier" +# Version of the packaged application. +QPKG_VER="$ZTO_VER" +# Author or maintainer of the package +QPKG_AUTHOR="ZeroTier, Inc." +# License for the packaged application +QPKG_LICENSE="BUSL-1.1" +# One-line description of the packaged application +QPKG_SUMMARY="$ZTO_DESC" + +# Preferred number in start/stop sequence. +QPKG_RC_NUM="101" +# Init-script used to control the start and stop of the installed application. +QPKG_SERVICE_PROGRAM="zerotier.sh" + +# Specifies any packages required for the current package to operate. +QPKG_REQUIRE="QVPN Service" +# Specifies what packages cannot be installed if the current package +# is to operate properly. +#QPKG_CONFLICT="Python, OPT/sed" +# Name of configuration file (multiple definitions are allowed). +#QPKG_CONFIG="myApp.conf" +#QPKG_CONFIG="/etc/config/myApp.conf" +# Port number used by service program. +QPKG_SERVICE_PORT="9993" + +# Minimum QTS version requirement +QTS_MINI_VERSION="4.1.0" +# Maximum QTS version requirement +QTS_MAX_VERSION="5.0.0" + +# Location of icons for the packaged application. +QDK_DATA_DIR_ICONS="icons" +EOM + +# Copy binaries into pkg directory +# See: https://github.com/qnap-dev/QDK +cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-aarch64 pkg/qnap/zerotier/arm_64/zerotier-one +#cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-armv5tejl pkg/qnap/zerotier/arm-x09/zerotier-one +#cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-armv5tel pkg/qnap/zerotier/arm-x19/zerotier-one +cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-armhf pkg/qnap/zerotier/arm-x31/zerotier-one +cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-armhf pkg/qnap/zerotier/arm-x41/zerotier-one +cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-i386 pkg/qnap/zerotier/x86/zerotier-one +cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-x86_64 pkg/qnap/zerotier/x86_64/zerotier-one +cp -vf output/static/zerotier-one.${ZTO_VER}.alpine-i386 pkg/qnap/zerotier/x86_ce53xx/zerotier-one + +rm -rf output/qnap/* + +pushd pkg/qnap/zerotier +./qbuild #--build-arch arm-x31 +cp -f build/* ../../../output/qnap + +# Show output product +cd popd diff --git a/pkg/qnap/qdk.conf b/pkg/qnap/qdk.conf new file mode 100644 index 000000000..90942b431 --- /dev/null +++ b/pkg/qnap/qdk.conf @@ -0,0 +1,3 @@ +QDK_VERSION=2.3.11 +QDK_PATH_P=`pwd | awk 'BEGIN { FS = "QDK" } ; { print $1 }'` +QDK_PATH="${QDK_PATH_P}/QDK" diff --git a/pkg/qnap/zerotier/Makefile b/pkg/qnap/zerotier/Makefile new file mode 100644 index 000000000..caea3915f --- /dev/null +++ b/pkg/qnap/zerotier/Makefile @@ -0,0 +1,7 @@ +.PHONY: all + +all: + @$(CC) -o qpkg_encrypt qpkg_encrypt.c + +clean: + rm -rf /bin/qpkg_encrypt diff --git a/pkg/qnap/zerotier/arm_64/.gitkeep b/pkg/qnap/zerotier/arm_64/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/arm_x09/.gitkeep b/pkg/qnap/zerotier/arm_x09/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/arm_x10/.gitkeep b/pkg/qnap/zerotier/arm_x10/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/arm_x12/.gitkeep b/pkg/qnap/zerotier/arm_x12/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/arm_x19/.gitkeep b/pkg/qnap/zerotier/arm_x19/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/arm_x31/.gitkeep b/pkg/qnap/zerotier/arm_x31/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/arm_x41/.gitkeep b/pkg/qnap/zerotier/arm_x41/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/config/.gitkeep b/pkg/qnap/zerotier/config/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/icons/.gitkeep b/pkg/qnap/zerotier/icons/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/icons/ZeroTier.gif b/pkg/qnap/zerotier/icons/ZeroTier.gif new file mode 100644 index 0000000000000000000000000000000000000000..db1b190c4436cc4b35777ff84e61a9f0e4a969b4 GIT binary patch literal 2765 zcmV;;3NrPHP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv00000008+zyMF)x010qNS#tmY3labT3lag+-G2N4017clL_t(|+U=cta8%VD z$3OSpede)wZDdmjwIme4&m~9~5wK#?D~DN43*-+UY|pV@2(> zQ>t}D>w{WfqqkJR*6~rWM$1E%BtTxUkz|wIB)fb2M@ZZ(o9wx}8}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D1AsH-hLWs`xek+=9l3< zC78}=+*PlOJ{%{L29T&s@o2c zu#gW!L?XyrA4UJ*Rj8hio>PeQRWs73+n~M4kSk|a7UdO{=@rmwwKC`YZwm_uK)4TS z_q#~D-%Y<@!yvVIp~ai{0N@DBnmyZ4KtbpyEJ+gQpMOD8@v_s6@6@V>?1iT>Ik~wk zzTyhA+c&Dz%$iN<$N4UvrJ&a>4@2vP@oH9xHCY zBi^}*)1K>ZSdP26*l;;RD-oB=g~#JzAR6esbu&lGAey_BWPmZjt) zsbGT3<-+B1F?sS7Haz$v)P+7Spw>LWJpOU6&9Y8KXVPPSa zmEy}7=s%9-^Z5ov3xz^_xqmi;CnKg^N{Cq>t$;hEomSytu^J7m( z8s>%@ZxUX5N|Hp|(Kh3CHANvoQeEv>EEeuuwTisFyb(@gGi>_l98#z(Wh&O zfWzEeHqHs+?9M$pM8IG$Xm%Zkkj}m;9mH80eklWo2R`-o_NFxZPdAx#2}U>^j*T+) z0=s13AJM6qBw!{H=hwMIRn>qD3^}*Z)YK##3K}a!B9VAo{GNsWrQCbKf1`7nnv89S z_@?9c`(p=?R^T}RSyfe?nCtJ_+uLbuY&5&x89{edjs;VymZ$w)( zH#c+WkoaEVZzA2@-SIBL{S??Z@F98{vjS+2wrpx@!t3>p$qBaK?~f;5H*meGs)NIE zyjy(V28LYWHhzmQkmwfQ0W?jU2W$mSI_fiq?~(2SZcc4YTS+8 zaU;^Is_p|W0)7mP)k$F=@ECCRaN>d3e{*mHcK|m7W8q%pHu@JAn^aY8NM!tf-IYP~ TdnXnm00000NkvXXu0mjf%;QvP literal 0 HcmV?d00001 diff --git a/pkg/qnap/zerotier/icons/ZeroTier_80.gif b/pkg/qnap/zerotier/icons/ZeroTier_80.gif new file mode 100644 index 0000000000000000000000000000000000000000..db1b190c4436cc4b35777ff84e61a9f0e4a969b4 GIT binary patch literal 2765 zcmV;;3NrPHP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv00000008+zyMF)x010q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pz6yDpGYOyu8*>WE%Rk_N>juMX8=SFjG-not52)sJM{Ckg!t-eI)fBzIe#>3Zl zeGvNE#z!MruiaF4u_kYN&%v6xRZmOf0JJDsy%nT2*n##IQj5_n=rbQxdsBk%f`OI) zWlqwYwk=pcDv!rHNrVaYsI+r6C%*OLckbv48@=oqQk57nNd!ec2Nj$|u8r9aW(S`y zSwy-hmv9}B^9M{QU&b!q(@nCVRG8Kc|Jk+e@^pJ(JrR^8f8Q?V|sG~>kG^E8oUGBgJRo}hCPGdGHCGI?VTy?C7tyRjm^*-MU z@^;@H9WFir))JU3vy)Vn(V}MUi=5%jd6M5xZ5G>!0W%E_a&xw zmC&M`N@pAX!7s=quRuH9EMvo-BU9;t;Pj)GPs*V#*yO~B-aDA+%ATUeRTr$QI2!O= zxqs}hIB3U;&|_Mt^`?8x29uP4>2<>W{le8K;&!EzdOC$l7~0Qf!0aC<`Ok8W-mq$G z@zi&$9oJc_UD)!1O~7cByRKg5ZAq!S6uAjxdGyjBirOF*jpv*TA_$o2cBM<@(XPap z2)QadB%11Bd<9E(KrW{{c2CkzjSuaJX&39OM)Gg5LBUu`imU!0ZyqB4?W)%c!|Ly% zbMfTKSjYHNO3h6cZT>xc%`l$_Bm|!tq(5<1snV^`CGgiZjD&U~Y*I z1wF9ujmR-S(lq4_8In|#E4gZRnwZDFA_r(K4tL&(GpdN8ZId57dF_pip@|MhvCJIB z_1*VzZ6a&ze4Y_I_6bA2q4Te59m9DO+{lA|8~7H&Z+LjSxppgWvviRg<`Wt!QE)N~ V)lQ>pQKT;wu(yFjN~{rK{{pPKEVTdt literal 0 HcmV?d00001 diff --git a/pkg/qnap/zerotier/package_routines b/pkg/qnap/zerotier/package_routines new file mode 100644 index 000000000..e80c71458 --- /dev/null +++ b/pkg/qnap/zerotier/package_routines @@ -0,0 +1,158 @@ +###################################################################### +# List of available definitions (it's not necessary to uncomment them) +###################################################################### +###### Command definitions ##### +#CMD_AWK="/bin/awk" +#CMD_CAT="/bin/cat" +#CMD_CHMOD="/bin/chmod" +#CMD_CHOWN="/bin/chown" +#CMD_CP="/bin/cp" +#CMD_CUT="/bin/cut" +#CMD_DATE="/bin/date" +#CMD_ECHO="/bin/echo" +#CMD_EXPR="/usr/bin/expr" +#CMD_FIND="/usr/bin/find" +#CMD_GETCFG="/sbin/getcfg" +#CMD_GREP="/bin/grep" +#CMD_GZIP="/bin/gzip" +#CMD_HOSTNAME="/bin/hostname" +#CMD_LN="/bin/ln" +#CMD_LOG_TOOL="/sbin/log_tool" +#CMD_MD5SUM="/bin/md5sum" +#CMD_MKDIR="/bin/mkdir" +#CMD_MV="/bin/mv" +#CMD_RM="/bin/rm" +#CMD_RMDIR="/bin/rmdir" +#CMD_SED="/bin/sed" +#CMD_SETCFG="/sbin/setcfg" +#CMD_SLEEP="/bin/sleep" +#CMD_SORT="/usr/bin/sort" +#CMD_SYNC="/bin/sync" +#CMD_TAR="/bin/tar" +#CMD_TOUCH="/bin/touch" +#CMD_WGET="/usr/bin/wget" +#CMD_WLOG="/sbin/write_log" +#CMD_XARGS="/usr/bin/xargs" +#CMD_7Z="/usr/local/sbin/7z" +# +###### System definitions ##### +#SYS_EXTRACT_DIR="$(pwd)" +#SYS_CONFIG_DIR="/etc/config" +#SYS_INIT_DIR="/etc/init.d" +#SYS_STARTUP_DIR="/etc/rcS.d" +#SYS_SHUTDOWN_DIR="/etc/rcK.d" +#SYS_RSS_IMG_DIR="/home/httpd/RSS/images" +#SYS_QPKG_DATA_FILE_GZIP="./data.tar.gz" +#SYS_QPKG_DATA_FILE_BZIP2="./data.tar.bz2" +#SYS_QPKG_DATA_FILE_7ZIP="./data.tar.7z" +#SYS_QPKG_DATA_CONFIG_FILE="./conf.tar.gz" +#SYS_QPKG_DATA_MD5SUM_FILE="./md5sum" +#SYS_QPKG_DATA_PACKAGES_FILE="./Packages.gz" +#SYS_QPKG_CONFIG_FILE="$SYS_CONFIG_DIR/qpkg.conf" +#SYS_QPKG_CONF_FIELD_QPKGFILE="QPKG_File" +#SYS_QPKG_CONF_FIELD_NAME="Name" +#SYS_QPKG_CONF_FIELD_VERSION="Version" +#SYS_QPKG_CONF_FIELD_ENABLE="Enable" +#SYS_QPKG_CONF_FIELD_DATE="Date" +#SYS_QPKG_CONF_FIELD_SHELL="Shell" +#SYS_QPKG_CONF_FIELD_INSTALL_PATH="Install_Path" +#SYS_QPKG_CONF_FIELD_CONFIG_PATH="Config_Path" +#SYS_QPKG_CONF_FIELD_WEBUI="WebUI" +#SYS_QPKG_CONF_FIELD_WEBPORT="Web_Port" +#SYS_QPKG_CONF_FIELD_SERVICEPORT="Service_Port" +#SYS_QPKG_CONF_FIELD_SERVICE_PIDFILE="Pid_File" +#SYS_QPKG_CONF_FIELD_AUTHOR="Author" +#SYS_QPKG_CONF_FIELD_RC_NUMBER="RC_Number" +## The following variables are assigned values at run-time. +#SYS_HOSTNAME=$($CMD_HOSTNAME) +## Data file name (one of SYS_QPKG_DATA_FILE_GZIP, SYS_QPKG_DATA_FILE_BZIP2, +## or SYS_QPKG_DATA_FILE_7ZIP) +#SYS_QPKG_DATA_FILE= +## Base location. +#SYS_QPKG_BASE="" +## Base location of QPKG installed packages. +#SYS_QPKG_INSTALL_PATH="" +## Location of installed software. +#SYS_QPKG_DIR="" +## If the QPKG should be enabled or disabled after the installation/upgrade. +#SYS_QPKG_SERVICE_ENABLED="" +## Architecture of the device the QPKG is installed on. +#SYS_CPU_ARCH="" +## Name and location of system shares +#SYS_PUBLIC_SHARE="" +#SYS_PUBLIC_PATH="" +#SYS_DOWNLOAD_SHARE="" +#SYS_DOWNLOAD_PATH="" +#SYS_MULTIMEDIA_SHARE="" +#SYS_MULTIMEDIA_PATH="" +#SYS_RECORDINGS_SHARE="" +#SYS_RECORDINGS_PATH="" +#SYS_USB_SHARE="" +#SYS_USB_PATH="" +#SYS_WEB_SHARE="" +#SYS_WEB_PATH="" +## Path to ipkg or opkg package tool if installed. +#CMD_PKG_TOOL= +# + +###################################################################### +# All package specific functions shall call 'err_log MSG' if an error +# is detected that shall terminate the installation. +###################################################################### + +###################################################################### +# Define any package specific operations that shall be performed when +# the package is removed. +###################################################################### + +#PKG_PRE_REMOVE="{ +#}" + +PKG_MAIN_REMOVE="{ + rm -rf /usr/sbin/zerotier-cli + # all identity files are stored in the Install_Path and will be removed automatically +}" + +#PKG_POST_REMOVE="{ +#}" + +###################################################################### +# Define any package specific initialization that shall be performed +# before the package is installed. +###################################################################### + +pkg_init() +{ + modprobe tun +} + + +###################################################################### +# Define any package specific requirement checks that shall be +# performed before the package is installed. +###################################################################### + +#pkg_check_requirement() +#{ +#} + +###################################################################### +# Define any package specific operations that shall be performed when +# the package is installed. +###################################################################### + +#pkg_pre_install() +#{ +# log "pkg_pre_install" +#} + +#pkg_install() +#{ +# log "pkg_install" +#} + +pkg_post_install() +{ + log $SYS_QPKG_INSTALL_PATH + modprobe tun +} diff --git a/pkg/qnap/zerotier/qpkg.cfg b/pkg/qnap/zerotier/qpkg.cfg new file mode 100644 index 000000000..ed641da90 --- /dev/null +++ b/pkg/qnap/zerotier/qpkg.cfg @@ -0,0 +1,99 @@ +# Update package config +# Name of the packaged application. +QPKG_NAME="zerotier" +# Name of the display application. +QPKG_DISPLAY_NAME="ZeroTier" +# Version of the packaged application. +QPKG_VER="1.8.4" +# Author or maintainer of the package +QPKG_AUTHOR="ZeroTier, Inc." +# License for the packaged application +QPKG_LICENSE="BUSL-1.1" +# One-line description of the packaged application +QPKG_SUMMARY="Securely connect any device, anywhere." + +# Preferred number in start/stop sequence. +QPKG_RC_NUM="101" +# Init-script used to control the start and stop of the installed application. +QPKG_SERVICE_PROGRAM="zerotier.sh" + +# Specifies any packages required for the current package to operate. +QPKG_REQUIRE="QVPN Service" +# Specifies what packages cannot be installed if the current package +# is to operate properly. +#QPKG_CONFLICT="Python, OPT/sed" +# Name of configuration file (multiple definitions are allowed). +#QPKG_CONFIG="myApp.conf" +#QPKG_CONFIG="/etc/config/myApp.conf" +# Port number used by service program. +QPKG_SERVICE_PORT="9993" +# Location of file with running service's PID +#QPKG_SERVICE_PIDFILE="/var/lib/zerotier-one/zerotier-one.pid" +# Relative path to web interface +#QPKG_WEBUI="" +# Port number for the web interface. +#QPKG_WEB_PORT="" +# Port number for the SSL web interface. +#QPKG_WEB_SSL_PORT="" + +# Use QTS HTTP Proxy and set Proxy_Path in the qpkg.conf. +# When the QPKG has its own HTTP service port, and want clients to connect via QTS HTTP port (default 8080). +# Usually use this option when the QPKG need to connect via myQNAPcloud service. +#QPKG_USE_PROXY="1" +#QPKG_PROXY_PATH="/qpkg_name" + +#Desktop Application (since 4.1) +# Set value to 1 means to open the QPKG's Web UI inside QTS desktop instead of new window. +#QPKG_DESKTOP_APP="1" +# Desktop Application Window default inner width (since 4.1) (not over 1178) +#QPKG_DESKTOP_APP_WIN_WIDTH="" +# Desktop Application Window default inner width (since 4.1) (not over 600) +#QPKG_DESKTOP_APP_WIN_HEIGHT="" + +# Minimum QTS version requirement +QTS_MINI_VERSION="4.1.0" +# Maximum QTS version requirement +QTS_MAX_VERSION="5.0.0" + +# Select volume +# 1: support installation +# 2: support migration +# 3 (1+2): support both installation and migration +#QPKG_VOLUME_SELECT="0" + +# Set timeout for QPKG enable and QPKG disable (since 4.1.0) +# Format in seconds (enable, disable) +#QPKG_TIMEOUT="10,30" + +# Visible setting for the QPKG that has web UI, show this QPKG on the Main menu of +# 1(default): administrators, 2: all NAS users. +#QPKG_VISIBLE="2" + +# Location of the chroot environment (only TS-x09) +#QPKG_ROOTFS="" +# Init-script used to controls the start and stop of the +# installed application (only TS-x09) +#QPKG_SERVICE_PROGRAM_CHROOT="" + +# Location of icons for the packaged application. +QDK_DATA_DIR_ICONS="icons" +# Location of files specific to arm-x09 packages. +#QDK_DATA_DIR_X09="arm-x09" +# Location of files specific to arm-x19 packages. +#QDK_DATA_DIR_X19="arm-x19" +# Location of files specific to arm-x31 packages. +#QDK_DATA_DIR_X31="arm-x31" +# Location of files specific to arm-x41 packages. +#QDK_DATA_DIR_X41="arm_al" +# Location of files specific to x86 packages. +#QDK_DATA_DIR_X86="x86" +# Location of files specific to x86 (64-bit) packages. +#QDK_DATA_DIR_X86_64="x86_64" +# Location of files common to all architectures. +#QDK_DATA_DIR_SHARED="shared" +# Location of configuration files. +#QDK_DATA_DIR_CONFIG="config" +# Name of local data package. +#QDK_DATA_FILE="" +# Name of extra package (multiple definitions are allowed). +#QDK_EXTRA_FILE="" diff --git a/pkg/qnap/zerotier/shared/.gitkeep b/pkg/qnap/zerotier/shared/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/shared/.qpkg_icon.gif b/pkg/qnap/zerotier/shared/.qpkg_icon.gif new file mode 100644 index 0000000000000000000000000000000000000000..900f2d4cdcb749615425108c33e5e26720389a88 GIT binary patch literal 1853 zcmV-D2g3MANk%w1VNd{20QLX?0000C3I-Gl1{Dtp8V(2=6bc{}3nd#4Djg3o9}g=Z z5GNoIE+G&zBM~|#6Fw>xLoF6VFBm{D7e+D}Ni!KsIU7t9YfvV0Q73p(CwEjSdR8ihUM+}UE{kF>hGj5_W-yFuGLvUAlx#Gd zY&55JIH`9zp?Eo~c{;UvI<$sAyoEpivOm0rK(vTKyNg1-lSaIoO2vji!-+x2j6%zk zMa`H<)|N-umPgl@NY$K5-J40{ol4fAOxvVR*Q!z7sZiIkROO;f?4nKgtVjN?ME|W$ z|FT2>xkK}`O#ib?|GP}%tWoW%QS+=(|F2X3uUPH0RrIq}|Fc#1xmW+WR`jx4|FBr} zxmf?aS>2{$+^u%wuWj$KYxTBf`L<>Av}oY6f9|?@|HM@P#a;i&UjNQv|I=ju*=GOU zY52f#|K@D}>2Ckwa{ujc|M79ttcCQ;jQ{`u000000000000000A^8LW004UcA^!_W zZDD6+O<`wgV`~j(VQp<;JuogbH8eFf04x9i002+`Pyhf2{(yUegM(*RU|flch>DGl zj#!V9kduj6PhMq&o19}@Q&V1*qok#!kzQU{pkkbyVo;5YrnHZo*C?o-32uD0HK+;hTnS9zt9QQQ||16CGk?*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!ytV5OKMC(3Y&<+6N*WVCs2VCF<=8FiMP1dcwq``=*1pD!OSC> rA{5#b1RAD5%-|q08C-zE6U-1!LXe>gAH+>Ah0~l*bRm|m2m}B-|1vn# literal 0 HcmV?d00001 diff --git a/pkg/qnap/zerotier/shared/.qpkg_icon_80.gif b/pkg/qnap/zerotier/shared/.qpkg_icon_80.gif new file mode 100644 index 0000000000000000000000000000000000000000..900f2d4cdcb749615425108c33e5e26720389a88 GIT binary patch literal 1853 zcmV-D2g3MANk%w1VNd{20QLX?0000C3I-Gl1{Dtp8V(2=6bc{}3nd#4Djg3o9}g=Z z5GNoIE+G&zBM~|#6Fw>xLoF6VFBm{D7e+D}Ni!KsIU7t9YfvV0Q73p(CwEjSdR8ihUM+}UE{kF>hGj5_W-yFuGLvUAlx#Gd zY&55JIH`9zp?Eo~c{;UvI<$sAyoEpivOm0rK(vTKyNg1-lSaIoO2vji!-+x2j6%zk zMa`H<)|N-umPgl@NY$K5-J40{ol4fAOxvVR*Q!z7sZiIkROO;f?4nKgtVjN?ME|W$ z|FT2>xkK}`O#ib?|GP}%tWoW%QS+=(|F2X3uUPH0RrIq}|Fc#1xmW+WR`jx4|FBr} zxmf?aS>2{$+^u%wuWj$KYxTBf`L<>Av}oY6f9|?@|HM@P#a;i&UjNQv|I=ju*=GOU zY52f#|K@D}>2Ckwa{ujc|M79ttcCQ;jQ{`u000000000000000A^8LW004UcA^!_W zZDD6+O<`wgV`~j(VQp<;JuogbH8eFf04x9i002+`Pyhf2{(yUegM(*RU|flch>DGl zj#!V9kduj6PhMq&o19}@Q&V1*qok#!kzQU{pkkbyVo;5YrnHZo*C?o-32uD0HK+;hTnS9zt9QQQ||16CGk?*oL7Pj0zu;bEHL* zm@5?=OjyaXrOTESD6EwEvStLC5F*r^ptEHJ1tZ!>lIEz*l>h*eDqYI7sne%WqcVjc zl-9`x0}g22%C)Q4t_%t!HK5?D*|P@}0LairpQ4felI(GrCCZ;ZxsKr2NIK+=C{+LA z%@yp$Zs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Swu~TfTN@=_}&;;WG$0;P^k?&5~jO literal 0 HcmV?d00001 diff --git a/pkg/qnap/zerotier/shared/zerotier.sh b/pkg/qnap/zerotier/shared/zerotier.sh new file mode 100755 index 000000000..a5c1aa55e --- /dev/null +++ b/pkg/qnap/zerotier/shared/zerotier.sh @@ -0,0 +1,34 @@ +#!/bin/sh +CONF=/etc/config/qpkg.conf +QPKG_NAME="zerotier" +QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f ${CONF}` +APACHE_ROOT=/share/`/sbin/getcfg SHARE_DEF defWeb -d Qweb -f /etc/config/def_share.info` +case "$1" in + start) + modprobe tun + ln -s $QPKG_ROOT/zerotier-one /usr/sbin/zerotier-cli + ln -s $QPKG_ROOT/zerotier-one /usr/bin/zerotier-cli + ln -s $QPKG_ROOT /var/lib/zerotier-one + ENABLED=$(/sbin/getcfg $QPKG_NAME Enable -u -d FALSE -f $CONF) + if [ "$ENABLED" != "TRUE" ]; then + echo "$QPKG_NAME is disabled." + exit 1 + fi + $QPKG_ROOT/zerotier-one $QPKG_ROOT -d + ;; + + stop) + killall zerotier-one + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit 0 diff --git a/pkg/qnap/zerotier/x86/.gitkeep b/pkg/qnap/zerotier/x86/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/x86_64/.gitkeep b/pkg/qnap/zerotier/x86_64/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/qnap/zerotier/x86_ce53xx/.gitkeep b/pkg/qnap/zerotier/x86_ce53xx/.gitkeep new file mode 100644 index 000000000..e69de29bb