ZeroTierOne/pkg/asustor/zerotier/CONTROL/start-stop.sh

27 lines
318 B
Bash
Raw Normal View History

2022-04-26 15:33:48 +00:00
#!/bin/sh
. /etc/script/lib/command.sh
APKG_PKG_DIR=/usr/local/AppCentral/zerotier
case $1 in
start)
modprobe tun
# start script here
$APKG_PKG_DIR/bin/zerotier-one $APKG_PKG_DIR/data -d
;;
stop)
# stop script here
pkill zerotier
;;
*)
echo "usage: $0 {start|stop}"
exit 1
;;
esac
exit 0