# This script is almost identical to hostapd_manager.sh except all the
# screen outputs are supplressed except for error messages.
#
# Usage:
# hostapd_manager_quiet.sh -s Stratux-N12345 -p SquawkDirty! -c 5
# Command above sets the SSID to "Stratux-N12345, secures the network with the passphrase "SquawkDirty!, and changes the network channel to "5"
#
# hostapd_manager_quiet.sh -o
# Command above opens the network(removes any passphrase)
#
# hostapd_manager_quiet.sh -e
# Command above secures the WiFi network using the default passphrase "SquawkDirtyToMe!"
# Options:
# -s --Sets the SSID to ${BOLD}ssid${NORM}. -s stratux
# -c --Sets the channel to chan. -c 1
# -o --Turns off encryption and sets network to open. Cannot be used with -e or -p.
# -e --Turns on encryption with passphrase SquawkDirtyToMe!. Cannot be used with -o or -p
# -p --Turns on encryption with your chosen passphrase pass. 8-63 Printable Characters(ascii 32-126). Cannot be used with -o or -e. -p password!
#
# Important:
# After each call of this script the wifi network will disconnect and restart all associated services to apply the changes
Help documentation for hostapd_manager.sh.
Basic usage: hostapd_manager.sh -s ssid -c chan -p pass
The following command line switches are recognized.
-s --Sets the SSID to ssid. "-s stratux"
-c --Sets the channel to chan. "-c 1"
-o --Turns off encryption and sets network to open. Cannot be used with -e or -p.
-e --Turns on encryption with passphrase SquawkDirtyToMe!. Cannot be used with -o or -p
-p --Turns on encryption with your chosen passphrase pass. 8-63 Printable Characters(ascii 32-126). Cannot be used with -o or -e. "-p password!"
-q --Run silently. Still a work in progress, but quieter.
-h --Displays this help message. No further functions are performed.
Example: hostapd_manager.sh -s Stratux-N3558D -c 5 -p SquawkDirty!
It seems to work in my testing!!
#### Stratux HOSTAPD Settings ####
Help documentation for hostapd_manager.sh.
Basic usage: hostapd_manager.sh -s ssid -c chan -p pass
The following command line switches are recognized.
-s --Sets the SSID to ssid. "-s stratux"
-c --Sets the channel to chan. "-c 1"
-o --Turns off encryption and sets network to open. Cannot be used with -e or -p.
-e --Turns on encryption with passphrase SquawkDirtyToMe!{NORM}. Cannot be used with -o or -p
-p --Turns on encryption with your chosen passphrase pass. 8-63 Printable Characters(ascii 32-126). Cannot be used with -o or -e. "-p password!"
-q --Run silently. Still a work in progress, but quieter.
-h --Displays this help message. No further functions are performed.
Example: hostapd_manager.sh -s Stratux-N3558D -c 5 -p SquawkDirtyToMe!
I cleaned up these comments and added the code that worked for me to get his running. I can now connect to my home wifi and cell phone hotspot with these settings.
I removes all my code from this file and moved to stratux-pre-start.sh. This seems like a logical place to monkey around with stuff that must be ready for the start of stratux.
This script now not only starts hostapd using the proper driver(standard/edimax).
It now checks for the existance of the hostapd.user file and if found uses it. if not found creates it with the values from the existing hostapd.conf
I choose to only carry over the values from the hostaod.conf and not the edimax because they should be the same.
If there is no user configurable values in hostapd.conf and no hostapd.user file then a default hostapd.user file is created.