From 98db0cd983093501ddd0e918117459fed5a1a4bf Mon Sep 17 00:00:00 2001 From: ztimson Date: Sat, 27 Jul 2024 19:05:08 +0000 Subject: [PATCH] Made password required during enabling --- bin/access-point.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/access-point.sh b/bin/access-point.sh index 7ec0d91..b679000 100755 --- a/bin/access-point.sh +++ b/bin/access-point.sh @@ -3,7 +3,7 @@ # Configuration ======================================================================================================= 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_START="10.10.10.2" # Start of DHCP IP pool @@ -141,6 +141,11 @@ if [ -n "$FAILOVER" ]; then fi if [ -z "$(grep "$SCRIPT" /etc/crontab)" ]; then + if [ -z "$PASSWORD" ]; then + echo "Error: Password required" + show_help + exit 1 + fi enable_cron fi @@ -152,5 +157,10 @@ fi if [ "$DISABLE" == "true" ]; then disable_ap else + if [ -z "$PASSWORD" ]; then + echo "Error: Password required" + show_help + exit 1 + fi enable_ap fi