kopia lustrzana https://github.com/cyoung/stratux
update comments
rodzic
3ad982e1c0
commit
4a1ce917a3
|
@ -15,16 +15,16 @@ DAEMON_SBIN=/usr/sbin/hostapd
|
|||
#User settings for hostapd.conf and hostapd-edimax.conf
|
||||
DAEMON_USER_PREF=/etc/hostapd/hostapd.user
|
||||
|
||||
#temp hostapd.conf
|
||||
DAEMON_TMP=/tmp/hostapd.conf
|
||||
|
||||
#check for pi2 and change files
|
||||
EW7811Un=$(lsusb | grep EW-7811Un)
|
||||
RPI_REV=`cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' | sed 's/^1000//'`
|
||||
if [ "$RPI_REV" = "a01041" ] || [ "$RPI_REV" = "a21041" ] || [ "$RPI_REV" = "900092" ] || [ "$RPI_REV" = "900093" ] && [ "$EW7811Un" != '' ]; then
|
||||
# This is a RPi2B or RPi0 with Edimax USB Wifi dongle.
|
||||
DAEMON_CONF=/etc/hostapd/hostapd-edimax.conf
|
||||
DAEMON_SBIN=/etc/hostapd/hostapd-edimax
|
||||
# else
|
||||
# DAEMON_CONF=/etc/hostapd/hostapd.conf
|
||||
fi
|
||||
|
||||
#Make a new hostapd or hostapd-edimax conf file based on logic above
|
||||
|
@ -33,6 +33,7 @@ cp -f ${DAEMON_CONF} ${DAEMON_TMP}
|
|||
#inject user settings from file to tmp conf
|
||||
cat ${DAEMON_USER_PREF} >> ${DAEMON_TMP}
|
||||
|
||||
#start the daemon with the temp file
|
||||
${DAEMON_SBIN} -B ${DAEMON_TMP}
|
||||
|
||||
sleep 5
|
||||
|
|
Ładowanie…
Reference in New Issue