++abort ripe if password is not set
This commit is contained in:
parent
9f4b5a172e
commit
02ca6960aa
1 changed files with 6 additions and 0 deletions
6
ripe.sh
6
ripe.sh
|
@ -6,6 +6,7 @@ if [ $# -lt 2 ] ; then
|
||||||
echo "$0 network asn [nodryrun]"
|
echo "$0 network asn [nodryrun]"
|
||||||
echo "ASN needs to be in ASXXXXXX format"
|
echo "ASN needs to be in ASXXXXXX format"
|
||||||
echo "By default uses dry-run and does not create objects"
|
echo "By default uses dry-run and does not create objects"
|
||||||
|
echo "Requires environment variable RIPE_API_PASSWORD to be set"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -20,6 +21,11 @@ else
|
||||||
dryrun="&dry-run"
|
dryrun="&dry-run"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RIPE_API_PASSWORD" ]; then
|
||||||
|
echo "You need to set RIPE_API_PASSWORD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
form=$(mktemp)
|
form=$(mktemp)
|
||||||
|
|
||||||
case ${network} in
|
case ${network} in
|
||||||
|
|
Loading…
Reference in a new issue