commit 697cae0da04478da89bb9b1d2a286a356b80a932 Author: Gethec <4926029+Gethec@users.noreply.github.com> Date: Sat May 14 20:54:41 2022 -0500 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b24d71e --- /dev/null +++ b/.gitignore @@ -0,0 +1,50 @@ +# These are some examples of commonly ignored file patterns. +# You should customize this list as applicable to your project. +# Learn more about .gitignore: +# https://www.atlassian.com/git/tutorials/saving-changes/gitignore + +# Node artifact files +node_modules/ +dist/ + +# Compiled Java class files +*.class + +# Compiled Python bytecode +*.py[cod] + +# Log files +*.log + +# Package files +*.jar + +# Maven +target/ +dist/ + +# JetBrains IDE +.idea/ + +# Unit test reports +TEST*.xml + +# Generated by MacOS +.DS_Store + +# Generated by Windows +Thumbs.db + +# Applications +*.app +*.exe +*.war + +# Large media files +*.mp4 +*.tiff +*.avi +*.flv +*.mov +*.wmv + diff --git a/DockerUtilities/ContainerTools b/DockerUtilities/ContainerTools new file mode 100644 index 0000000..4dd2727 --- /dev/null +++ b/DockerUtilities/ContainerTools @@ -0,0 +1,25 @@ +#!/usr/bin/bash + +# Receive inputs, either single- or multi-line, and print them cleanly to the Docker logfile +function log () { + if [ -n "$@" ]; then + readarray -t input <<< "$@" + printf "[$SNAME] %s\n" "${input[@]}" + fi +} + +# Test the given container variable against variations of true/false, then return a single format usable by scripts +isEnabled() { + case "${1,,}" in + f|false|n|no|0|off) + false + ;; + t|true|y|yes|1|on) + true + ;; + *) + log "ERROR: Input value '$1' was not expected. Please check the accepted inputs" + exit 1 + esac + return +}