start-stop.sh 318 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. . /etc/script/lib/command.sh
  3. APKG_PKG_DIR=/usr/local/AppCentral/zerotier
  4. case $1 in
  5. start)
  6. modprobe tun
  7. # start script here
  8. $APKG_PKG_DIR/bin/zerotier-one $APKG_PKG_DIR/data -d
  9. ;;
  10. stop)
  11. # stop script here
  12. pkill zerotier
  13. ;;
  14. *)
  15. echo "usage: $0 {start|stop}"
  16. exit 1
  17. ;;
  18. esac
  19. exit 0