Skip to content

Commit

Permalink
askMode
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberAndi authored Sep 2, 2023
1 parent add2be7 commit 32775cd
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions openWRT_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ actWlan=$(ifconfig | grep '^w\w*' -m 1 | cut -f1 -d ' ')
INET_GW=$(ip route | grep default | cut -f3 -d ' ')
INET_GW_org=$INET_GW

read -p 'Please give me the WAN-IP (Gateway/Router): ('$INET_GW')' INET_GW
read -p 'Please give me the WAN-IP (Gateway/Router): ('$INET_GW') ' INET_GW
echo
if [ "$INET_GW" = "" ]
then
Expand Down Expand Up @@ -126,17 +126,20 @@ ACCESS_SERVER=$(echo $($(echo ip addr show dev $(echo $actEth | cut -f1 -d' '))
LAN=$(echo $($(echo ip addr show dev $(echo $actEth | cut -f1 -d' ')) | grep inet | cut -f6 -d ' ' ) | cut -f1 -d ' ' | cut -f1 -d'/' )
LAN_org=$LAN

#echo 'Type the LAN-IP (Internal Network): ('$LAN')'
read -p 'Type the LAN-IP (Internal Network): ('$LAN')' LAN
if [ "$LAN" = "" ]
then
LAN=$LAN_org
fi
echo
read -p 'Type the LAN-IP (Internal Network): ('$LAN') ' LAN
if [ "$LAN" = "" ]
then
LAN=$LAN_org
fi

LOCAL_DOMAIN='CyberSecBox.local'
echo
#echo 'Your local Domain of your LAN? (CyberSecBox.local)'
read -p 'Your local Domain of your LAN? (CyberSecBox.local)' LOCAL_DOMAIN
read -p 'Your local Domain of your LAN? (CyberSecBox.local) ' LOCAL_DOMAIN
if [ "$LOCAL_DOMAIN" = "" ]
then
LOCAL_DOMAIN='CyberSecBox.local'
Expand All @@ -146,7 +149,7 @@ WIFI_SSID='CyberSecBox'
WIFI_SSID_org=$WIFI_SSID
echo
#echo 'The Main-WiFi-SSID? ('$WIFI_SSID')'
read -p 'The Main-WiFi-SSID? ('$WIFI_SSID')' WIFI_SSID
read -p 'The Main-WiFi-SSID? ('$WIFI_SSID') ' WIFI_SSID
if [ "$WIFI_SSID" = "" ]
then
WIFI_SSID=$WIFI_SSID_org
Expand All @@ -156,15 +159,15 @@ fi
WIFI_PASS='Cyber,Sec9ox'
WIFI_PASS_org=$WIFI_PASS
echo
read -p 'And the WiFi-Key? (Cyber,Sec9ox)' WIFI_PASS
read -p 'And the WiFi-Key? (Cyber,Sec9ox) ' WIFI_PASS
if [ "$WIFI_PASS" = "" ]
then
WIFI_PASS=$WIFI_PASS_org
fi

USERNAME='root'
echo
read -p 'Enter the user for the login: (default: root)' -s USERNAME
read -p 'Enter the user for the login: (root) ' -s USERNAME
passwd $USERNAME

SUBNET=$(echo $LAN | cut -f3 -d '.')
Expand Down

0 comments on commit 32775cd

Please sign in to comment.