Skip to content

Commit

Permalink
add help and line arg
Browse files Browse the repository at this point in the history
  • Loading branch information
cptx86 committed Aug 1, 2016
1 parent 42fdc4b commit 0796c66
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions view-private-registry-remote
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,22 @@
REMOTE_REGISTRY_HOST="192.168.1.203"
# Enter remote registry v2 ssh admin account for the above host
REMOTE_ADMIN_ACCOUNT="uthree"
if [ "$1" == "--help" ]
then
echo $1"Usage: view-private-registry-remote REMOTE_REGISTRY_HOST REMOTE_ADMIN_ACCOUNT"
exit
fi
if [ -z $1 ]
then
# Set remote registtry v2 server IP address or FQDN
REMOTE_REGISTRY_HOST="$1"
echo "REMOTE_REGISTRY_HOST=$1"
fi
if [ -z $2 ]
then
# Set remote registry v2 ssh admin account for the above host
REMOTE_ADMIN_ACCOUNT="$2"
echo "REMOTE_ADMIN_ACCOUNT=$2"
fi
##
ssh $REMOTE_ADMIN_ACCOUNT@$REMOTE_REGISTRY_HOST /usr/local/bin/view-private-registry

0 comments on commit 0796c66

Please sign in to comment.