remove required arg

This commit is contained in:
Cyberes 2024-02-28 14:11:45 -07:00
parent ea48471215
commit e1c4886c50
1 changed files with 2 additions and 4 deletions

View File

@ -4,7 +4,6 @@
usage() {
echo "Usage: $0 -d domain -u email -k key -i ip_checker"
echo " -d The domain to check"
echo " -u The Cloudflare email"
echo " -k The Cloudflare API key"
echo " -i The IP checker service URL"
echo " -e The expected IP of the domain. Optional, use instead of -i"
@ -13,11 +12,10 @@ usage() {
expected_ip=""
while getopts d:u:k:i:e: flag
while getopts d:k:i:e: flag
do
case "${flag}" in
d) domain=${OPTARG};;
u) email=${OPTARG};;
k) key=${OPTARG};;
i) ip_checker=${OPTARG};;
e) expected_ip=${OPTARG};;
@ -26,7 +24,7 @@ do
done
# Check that all arguments were provided
if [ -z "$domain" ] || [ -z "$email" ] || [ -z "$key" ] || [ -z "$ip_checker" ]; then
if [ -z "$domain" ] || [ -z "$key" ] || [ -z "$ip_checker" ]; then
usage
fi