aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/files/wpad.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/services/hostapd/files/wpad.init')
-rw-r--r--package/network/services/hostapd/files/wpad.init25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/wpad.init b/package/network/services/hostapd/files/wpad.init
new file mode 100644
index 0000000000..3198e9801f
--- /dev/null
+++ b/package/network/services/hostapd/files/wpad.init
@@ -0,0 +1,25 @@
+#!/bin/sh /etc/rc.common
+
+START=19
+STOP=21
+
+USE_PROCD=1
+NAME=wpad
+
+start_service() {
+ if [ -x "/usr/sbin/hostapd" ]; then
+ mkdir -p /var/run/hostapd
+ procd_open_instance hostapd
+ procd_set_param command /usr/sbin/hostapd -s -g /var/run/hostapd/global
+ procd_set_param respawn
+ procd_close_instance
+ fi
+
+ if [ -x "/usr/sbin/wpa_supplicant" ]; then
+ mkdir -p /var/run/wpa_supplicant
+ procd_open_instance supplicant
+ procd_set_param command /usr/sbin/wpa_supplicant -n -s -g /var/run/wpa_supplicant/global
+ procd_set_param respawn
+ procd_close_instance
+ fi
+}