#!/bin/sh

RES=`cat /etc/network/interfaces.d/wlan0 | grep -e ^auto`

if [ "x$RES" != "x" ]; then
    /sbin/hostapd $@
else
    sleep 10
fi
