CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

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