Made password required during enabling

This commit is contained in:
Zakary Timson 2024-07-27 19:05:08 +00:00
parent 5750d5bba3
commit 98db0cd983

View File

@ -3,7 +3,7 @@
# Configuration ======================================================================================================= # Configuration =======================================================================================================
SSID="$HOSTNAME" # Default SSID to device hostname SSID="$HOSTNAME" # Default SSID to device hostname
PASSWORD="guesswhatitis" # Default password if not specified PASSWORD="" # Default password if not specified
DHCP_IP="10.10.10.1" # Device IP on access point DHCP_IP="10.10.10.1" # Device IP on access point
DHCP_START="10.10.10.2" # Start of DHCP IP pool DHCP_START="10.10.10.2" # Start of DHCP IP pool
@ -141,6 +141,11 @@ if [ -n "$FAILOVER" ]; then
fi fi
if [ -z "$(grep "$SCRIPT" /etc/crontab)" ]; then if [ -z "$(grep "$SCRIPT" /etc/crontab)" ]; then
if [ -z "$PASSWORD" ]; then
echo "Error: Password required"
show_help
exit 1
fi
enable_cron enable_cron
fi fi
@ -152,5 +157,10 @@ fi
if [ "$DISABLE" == "true" ]; then if [ "$DISABLE" == "true" ]; then
disable_ap disable_ap
else else
if [ -z "$PASSWORD" ]; then
echo "Error: Password required"
show_help
exit 1
fi
enable_ap enable_ap
fi fi