mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 12:15:32 +03:00
Daemon that connects to wpa_supplicant and handles connect and disconnect events https://git.archlinux.org/wpa_actiond.git Use case: A plain and simple way to automatically configure wireless networks depending on SSID by invoking user supplied scripts. I provided a patch to convert the nested function into a regular one, so that GCC won't generate a trampoline. In addition, OpenRC integration was added.
22 lines
427 B
Text
22 lines
427 B
Text
#!/sbin/openrc-run
|
|
|
|
depend()
|
|
{
|
|
need net wpa_supplicant
|
|
}
|
|
|
|
start()
|
|
{
|
|
ebegin "Starting wpa_actiond"
|
|
start-stop-daemon --start --quiet --exec /usr/sbin/wpa_actiond -p /var/run/wpa_actiond.pid -- \
|
|
-i ${WPA_ACTIOND_INTERFACE} -a ${WPA_ACTIOND_SCRIPT} ${WPA_ACTIOND_OPTS}
|
|
eend $?
|
|
}
|
|
|
|
stop()
|
|
{
|
|
ebegin "Stopping wpa_actiond"
|
|
start-stop-daemon --stop --quiet --exec /usr/sbin/wpa_actiond -p /var/run/wpa_actiond.pid
|
|
eend $?
|
|
}
|
|
|