mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 21:33:57 -07:00
Add QNAP build scripts
This commit is contained in:
parent
b47a2c9ac5
commit
4f80e79886
27 changed files with 398 additions and 0 deletions
0
pkg/qnap/zerotier/shared/.gitkeep
Normal file
0
pkg/qnap/zerotier/shared/.gitkeep
Normal file
BIN
pkg/qnap/zerotier/shared/.qpkg_icon.gif
Normal file
BIN
pkg/qnap/zerotier/shared/.qpkg_icon.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
pkg/qnap/zerotier/shared/.qpkg_icon_80.gif
Normal file
BIN
pkg/qnap/zerotier/shared/.qpkg_icon_80.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
pkg/qnap/zerotier/shared/.qpkg_icon_gray.gif
Normal file
BIN
pkg/qnap/zerotier/shared/.qpkg_icon_gray.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
34
pkg/qnap/zerotier/shared/zerotier.sh
Executable file
34
pkg/qnap/zerotier/shared/zerotier.sh
Executable file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue