mirror of
https://github.com/mag37/dockcheck.git
synced 2026-03-14 20:46:30 +01:00
added function to print currently backed up images
This commit is contained in:
parent
f16953a479
commit
49403b98a1
1 changed files with 8 additions and 1 deletions
|
|
@ -60,6 +60,12 @@ Help() {
|
||||||
echo "Project source: $Github"
|
echo "Project source: $Github"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Print current backups function
|
||||||
|
print_backups() {
|
||||||
|
printf "\n%b---%b Currently backed up images %b---%b\n\n" "$c_teal" "$c_blue" "$c_teal" "$c_reset"
|
||||||
|
docker images | sed -ne '/^REPOSITORY/p' -ne '/^dockcheck/p'
|
||||||
|
}
|
||||||
|
|
||||||
# Initialise variables
|
# Initialise variables
|
||||||
Timeout=${Timeout:-10}
|
Timeout=${Timeout:-10}
|
||||||
MaxAsync=${MaxAsync:-1}
|
MaxAsync=${MaxAsync:-1}
|
||||||
|
|
@ -104,7 +110,7 @@ c_reset="\033[0m"
|
||||||
RunTimestamp=$(date +'%Y-%m-%d_%H%M')
|
RunTimestamp=$(date +'%Y-%m-%d_%H%M')
|
||||||
RunEpoch=$(date +'%s')
|
RunEpoch=$(date +'%s')
|
||||||
|
|
||||||
while getopts "ayfFhiIlmMnprsuvc:e:d:k:t:x:R" options; do
|
while getopts "ayfFhiIlmMnprsuvc:e:d:k:Kt:x:R" options; do
|
||||||
case "${options}" in
|
case "${options}" in
|
||||||
a|y) AutoMode=true ;;
|
a|y) AutoMode=true ;;
|
||||||
c) CollectorTextFileDirectory="${OPTARG}" ;;
|
c) CollectorTextFileDirectory="${OPTARG}" ;;
|
||||||
|
|
@ -115,6 +121,7 @@ while getopts "ayfFhiIlmMnprsuvc:e:d:k:t:x:R" options; do
|
||||||
i) Notify=true ;;
|
i) Notify=true ;;
|
||||||
I) PrintReleaseURL=true ;;
|
I) PrintReleaseURL=true ;;
|
||||||
k) DaysKept="${OPTARG}" ;;
|
k) DaysKept="${OPTARG}" ;;
|
||||||
|
K) print_backups; exit 0 ;;
|
||||||
l) OnlyLabel=true ;;
|
l) OnlyLabel=true ;;
|
||||||
m) MonoMode=true ;;
|
m) MonoMode=true ;;
|
||||||
M) PrintMarkdownURL=true ;;
|
M) PrintMarkdownURL=true ;;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue