#!/bin/sh # # /etc/rc.d/sshd: start/stop hostapd # case $1 in start) /usr/sbin/hostapd -B -P /var/run/hostapd.pid /etc/hostapd.conf ;; stop) [ -f /var/run/hostapd.pid ] && kill `cat /var/run/hostapd.pid` && rm -f /var/run/hostapd.pid ;; restart) $0 stop sleep 2 $0 start ;; *) echo "usage: $0 [start|stop|restart]" ;; esac # End of file