mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
fix parameter check
This commit is contained in:
parent
54c1557e9a
commit
3899fdb14e
1 changed files with 4 additions and 3 deletions
|
@ -23,7 +23,7 @@ if [ "$1" = "ip-add" ]; then
|
|||
ip=$2
|
||||
countDots=$(echo "$ip" | grep -c '.')
|
||||
if [ ${countDots} -eq 0 ]; then
|
||||
echo "error='missing or invalid ip'"
|
||||
echo "error='missing or invalid IP'"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
@ -55,8 +55,9 @@ if [ "$1" = "ip-remove" ]; then
|
|||
# 2. parameter: ip
|
||||
ip=$2
|
||||
countDots=$(echo "$ip" | grep -c '.')
|
||||
if [ "${countDots}" != "4" ]; then
|
||||
echo "error='missing or invalid ip'"
|
||||
if [ ${countDots} -eq 0 ]; then
|
||||
echo "error='missing or invalid IP'"
|
||||
exit
|
||||
fi
|
||||
|
||||
# remove the line to the LND conf
|
||||
|
|
Loading…
Add table
Reference in a new issue