mirror of
https://github.com/pia-foss/manual-connections.git
synced 2025-02-05 14:08:29 +00:00
Normalize spacing
Added a few \n to echos for invalid input notifications, normalizing spacing.
This commit is contained in:
parent
42db36b7c1
commit
b8cb2c3684
20
run_setup.sh
20
run_setup.sh
|
@ -59,13 +59,13 @@ while :; do
|
||||||
unPrefix=$( echo ${PIA_USER:0:1} )
|
unPrefix=$( echo ${PIA_USER:0:1} )
|
||||||
unSuffix=$( echo ${PIA_USER:1} )
|
unSuffix=$( echo ${PIA_USER:1} )
|
||||||
if [[ -z "$PIA_USER" ]]; then
|
if [[ -z "$PIA_USER" ]]; then
|
||||||
echo -e "${RED}You must provide input.${NC}"
|
echo -e "\n${RED}You must provide input.${NC}"
|
||||||
elif [[ ${#PIA_USER} != 8 ]]; then
|
elif [[ ${#PIA_USER} != 8 ]]; then
|
||||||
echo -e "${RED}A PIA username is always 8 characters long.${NC}"
|
echo -e "\n${RED}A PIA username is always 8 characters long.${NC}"
|
||||||
elif [[ $unPrefix != "P" ]] && [[ $unPrefix != "p" ]]; then
|
elif [[ $unPrefix != "P" ]] && [[ $unPrefix != "p" ]]; then
|
||||||
echo -e "${RED}A PIA username must start with \"p\".${NC}"
|
echo -e "\n${RED}A PIA username must start with \"p\".${NC}"
|
||||||
elif ! [[ $unSuffix =~ $intCheck ]]; then
|
elif ! [[ $unSuffix =~ $intCheck ]]; then
|
||||||
echo -e "${RED}Username formatting is always p#######!${NC}"
|
echo -e "\n${RED}Username formatting is always p#######!${NC}"
|
||||||
else
|
else
|
||||||
echo -e "\n${GREEN}PIA_USER=$PIA_USER${NC}"
|
echo -e "\n${GREEN}PIA_USER=$PIA_USER${NC}"
|
||||||
break
|
break
|
||||||
|
@ -233,9 +233,9 @@ For example, you can try 0.2 for 200ms allowed latency.
|
||||||
if [[ -z "$latencyInput" ]]; then
|
if [[ -z "$latencyInput" ]]; then
|
||||||
break
|
break
|
||||||
elif [[ $latencyInput = 0 ]]; then
|
elif [[ $latencyInput = 0 ]]; then
|
||||||
echo -e ${RED}Latency input must not be zero.${NC}
|
echo -e "${RED}Latency input must not be zero.${NC}\n"
|
||||||
elif ! [[ $customLatency =~ $floatCheck ]]; then
|
elif ! [[ $customLatency =~ $floatCheck ]]; then
|
||||||
echo -e ${RED}Latency input must be numeric.${NC}
|
echo -e "${RED}Latency input must be numeric.${NC}\n"
|
||||||
elif [[ $latencyInput =~ $intCheck ]]; then
|
elif [[ $latencyInput =~ $intCheck ]]; then
|
||||||
MAX_LATENCY=$latencyInput
|
MAX_LATENCY=$latencyInput
|
||||||
break
|
break
|
||||||
|
@ -277,13 +277,13 @@ For example, you can try 0.2 for 200ms allowed latency.
|
||||||
while :; do
|
while :; do
|
||||||
read -p "Input the number of the server you want to connect to ([1]-[$i]) : " serverSelection
|
read -p "Input the number of the server you want to connect to ([1]-[$i]) : " serverSelection
|
||||||
if [[ -z "$serverSelection" ]]; then
|
if [[ -z "$serverSelection" ]]; then
|
||||||
echo -e "${RED}You must provide input.${NC}"
|
echo -e "\n${RED}You must provide input.${NC}\n"
|
||||||
elif ! [[ $serverSelection =~ $intCheck ]]; then
|
elif ! [[ $serverSelection =~ $intCheck ]]; then
|
||||||
echo -e "${RED}You must enter a number.${NC}"
|
echo -e "\n${RED}You must enter a number.${NC}\n"
|
||||||
elif [[ $serverSelection -lt 1 ]]; then
|
elif [[ $serverSelection -lt 1 ]]; then
|
||||||
echo -e "${RED}You must enter a number greater than 1.${NC}"
|
echo -e "\n${RED}You must enter a number greater than 1.${NC}\n"
|
||||||
elif [[ $serverSelection -gt $i ]]; then
|
elif [[ $serverSelection -gt $i ]]; then
|
||||||
echo -e "${RED}You must enter a number between 1 and $i.${NC}"
|
echo -e "\n${RED}You must enter a number between 1 and $i.${NC}\n"
|
||||||
else
|
else
|
||||||
PREFERRED_REGION=$( awk 'NR == '$serverSelection' {print $2}' /opt/piavpn-manual/latencyList )
|
PREFERRED_REGION=$( awk 'NR == '$serverSelection' {print $2}' /opt/piavpn-manual/latencyList )
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue
Block a user