From 8c53033159dda2ed869976cfd4764dca79f94e03 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Sat, 2 Mar 2024 00:52:59 -0800 Subject: [PATCH] Maybe defaulting to turning everything off when the script runs wasn't a great idea --- homelab/fighter/scripts/startup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/homelab/fighter/scripts/startup.sh b/homelab/fighter/scripts/startup.sh index 5f75cb4d..4466bcd5 100644 --- a/homelab/fighter/scripts/startup.sh +++ b/homelab/fighter/scripts/startup.sh @@ -1,9 +1,11 @@ #!/bin/bash #set -x # debugging flag -# Clean up any remnants from unclean shutdown -docker stop $(docker ps -q) # shut down running containers -docker rm $(docker ps -aq) # remove all containers +if "$1" == "clean"; then + # Clean up any remnants from unclean shutdown + docker stop $(docker ps -q) # shut down running containers + docker rm $(docker ps -aq) # remove all containers +fi # Check for network mounted devices # NAS SMB