mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-20 23:36:46 +02:00
34 lines
735 B
Bash
34 lines
735 B
Bash
#!/sbin/openrc-run
|
|
|
|
name="hostapd"
|
|
description="User space daemon for access point and authentication servers"
|
|
|
|
extra_started_commands="reload"
|
|
|
|
# $CONFIGS and $OPTIONS are deprecated since Alpine v3.17.
|
|
# NOTE: cfgfile can contain more than one file path in this case.
|
|
: ${cfgfile:=${CONFIGS:-"/etc/hostapd/hostapd.conf"}}
|
|
|
|
command="/usr/sbin/hostapd"
|
|
command_args="${command_args:-$OPTIONS} $cfgfile"
|
|
command_background="yes"
|
|
pidfile="/run/$RC_SVCNAME.pid"
|
|
|
|
required_files="$cfgfile"
|
|
|
|
depend() {
|
|
need net
|
|
after firewall
|
|
use logger
|
|
}
|
|
|
|
reload() {
|
|
ebegin "Reloading $name configuration"
|
|
|
|
if [ "$supervisor" ]; then
|
|
$supervisor "$RC_SVCNAME" --signal HUP
|
|
else
|
|
start-stop-daemon --signal HUP --pidfile "$pidfile"
|
|
fi
|
|
eend $?
|
|
}
|