mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-17 18:07:46 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d86c79710 | ||
|
|
b0f8431dbf |
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
VERSION="v0.4.2"
|
VERSION="v0.4.3"
|
||||||
### ChangeNotes: Added timeout option to skip container if registry check takes too long (10s default).
|
### ChangeNotes: Added timeout option to skip container if registry check takes too long (10s default) + fix.
|
||||||
Github="https://github.com/mag37/dockcheck"
|
Github="https://github.com/mag37/dockcheck"
|
||||||
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"
|
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"
|
||||||
|
|
||||||
@@ -44,6 +44,7 @@ c_blue="\033[0;34m"
|
|||||||
c_teal="\033[0;36m"
|
c_teal="\033[0;36m"
|
||||||
c_reset="\033[0m"
|
c_reset="\033[0m"
|
||||||
|
|
||||||
|
Timeout=10
|
||||||
Stopped=""
|
Stopped=""
|
||||||
while getopts "aynpfrhlisvme:d:t:" options; do
|
while getopts "aynpfrhlisvme:d:t:" options; do
|
||||||
case "${options}" in
|
case "${options}" in
|
||||||
@@ -57,7 +58,7 @@ while getopts "aynpfrhlisvme:d:t:" options; do
|
|||||||
e) Exclude=${OPTARG} ;;
|
e) Exclude=${OPTARG} ;;
|
||||||
m) declare c_{red,green,yellow,blue,teal,reset}="" ;;
|
m) declare c_{red,green,yellow,blue,teal,reset}="" ;;
|
||||||
s) Stopped="-a" ;;
|
s) Stopped="-a" ;;
|
||||||
t) Timeout="${OPTARG:-10}" ;;
|
t) Timeout="${OPTARG}" ;;
|
||||||
v) printf "%s\n" "$VERSION" ; exit 0 ;;
|
v) printf "%s\n" "$VERSION" ; exit 0 ;;
|
||||||
d) DaysOld=${OPTARG}
|
d) DaysOld=${OPTARG}
|
||||||
if ! [[ $DaysOld =~ ^[0-9]+$ ]] ; then { printf "Days -d argument given (%s) is not a number.\n" "${DaysOld}" ; exit 2 ; } ; fi ;;
|
if ! [[ $DaysOld =~ ^[0-9]+$ ]] ; then { printf "Days -d argument given (%s) is not a number.\n" "${DaysOld}" ; exit 2 ; } ; fi ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user