秦F103机巢代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 line
686B

  1. #!/bin/sh
  2. #
  3. # Start the Drone Nest Application....
  4. #
  5. PIDDIR=/var/run
  6. DNESTPID=$PIDDIR/DNest.pid
  7. APPDIR=/root/TH-DNest
  8. case "$1" in
  9. start)
  10. printf "Starting Drone Nest Application: "
  11. start-stop-daemon -S -q -m -b -p $DNESTPID --exec $APPDIR/dnest_daemon.sh
  12. [ $? = 0 ] && echo "OK" || echo "FAIL"
  13. ;;
  14. stop)
  15. printf "Stopping Drone Nest Application: "
  16. start-stop-daemon -S -q -m -b -p $DNESTPID --exec $APPDIR/stop.sh
  17. [ $? = 0 ] && echo "OK" || echo "FAIL"
  18. ;;
  19. restart|reload)
  20. "$0" stop
  21. "$0" start
  22. ;;
  23. *)
  24. echo "Usage: $0 {start|stop|restart}"
  25. exit 1
  26. esac
  27. exit $?