Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash -e
- usage="USAGE: $0 action [marsnat version]
- ACTIONS:
- start - starts the docker instance [takes optional masnat version]
- stop - stops the docker instance
- restart - restarts the docker instance [takes optional marsnat version]
- bash - puts you in the docker environment's bash prompt
- "
- ACTION=""
- VERSION=""
- while getopts "hs" flag; do
- case $flag in
- h)
- echo "$usage"
- exit 0
- ;;
- s)
- SILENT=1
- ;;
- esac
- done
- echo "$OPTIND"
- for (( x=1; x<$OPTIND; x++ )); do shift "$((OPTIND-1))"; done
- ACTION="$1"
- VERSION="$2"
- if [ "$ACTION" == "" ]; then
- echo "$usage"
- exit 1
- fi
- echo "action: $ACTION .... version: $VERSION"
Add Comment
Please, Sign In to add comment