Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: hostapd
  4. # Required-Start: $remote_fs
  5. # Required-Stop: $remote_fs
  6. # Should-Start: $network
  7. # Should-Stop:
  8. # Default-Start: 2 3 4 5
  9. # Default-Stop: 0 1 6
  10. # Short-Description: Advanced IEEE 802.11 management daemon
  11. # Description: Userspace IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP
  12. # Authenticator
  13. ### END INIT INFO
  14. PATH=/sbin:/bin:/usr/sbin:/usr/bin
  15. DAEMON_SBIN=/usr/local/bin/hostapd
  16. DAEMON_CONF=/etc/hostapd/hostapd.conf
  17. NAME=hostapd
  18. DESC="advanced IEEE 802.11 management"
  19. PIDFILE=/var/run/hostapd.pid
  20. [ -x "$DAEMON_SBIN" ] || exit 0
  21. [ -n "$DAEMON_CONF" ] || exit 0
  22. DAEMON_OPTS="-B -P $PIDFILE $DAEMON_OPTS $DAEMON_CONF"
  23. . /lib/lsb/init-functions
  24. case "$1" in
  25. start)
  26. log_daemon_msg "Starting $DESC" "$NAME"
  27. start-stop-daemon --start --oknodo --quiet --exec "$DAEMON_SBIN" \
  28. --pidfile "$PIDFILE" -- $DAEMON_OPTS >/dev/null
  29. log_end_msg "$?"
  30. ;;
  31. stop)
  32. log_daemon_msg "Stopping $DESC" "$NAME"
  33. start-stop-daemon --stop --oknodo --quiet --exec "$DAEMON_SBIN" \
  34. --pidfile "$PIDFILE"
  35. log_end_msg "$?"
  36. ;;
  37. reload)
  38. log_daemon_msg "Reloading $DESC" "$NAME"
  39. start-stop-daemon --stop --signal HUP --exec "$DAEMON_SBIN" \
  40. --pidfile "$PIDFILE"
  41. log_end_msg "$?"
  42. ;;
  43. restart|force-reload)
  44. $0 stop
  45. sleep 8
  46. $0 start
  47. ;;
  48. status)
  49. status_of_proc "$DAEMON_SBIN" "$NAME"
  50. exit $?
  51. ;;
  52. *)
  53. N=/etc/init.d/$NAME
  54. echo "Usage: $N {start|stop|restart|force-reload|reload|status}" >&2
  55. exit 1
  56. ;;
  57. esac
  58. exit 0