From d53e974d7e60295ed36c38a57870d1a6bfc7e399 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Sat, 9 Mar 2024 01:04:44 -0800 Subject: [PATCH] Update fighter startup/shutdown scripts --- fighter/scripts/shutdown.sh | 8 +++++--- fighter/scripts/startup.sh | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/fighter/scripts/shutdown.sh b/fighter/scripts/shutdown.sh index d2aa232..7f4bce9 100644 --- a/fighter/scripts/shutdown.sh +++ b/fighter/scripts/shutdown.sh @@ -1,6 +1,8 @@ #!/bin/bash for stack in /home/admin/homelab/fighter/config/*; do cd $stack && docker compose down; done -sudo umount /mnt/iscsi -sudo iscsiadm --mode node --targetname "iqn.2020-03.net.jafner:fighter" --portal "192.168.1.10:3260" --logout -for mount in media calibre-web torrenting av; do sudo umount /mnt/nas/$mount; done + +## I don't think unmounting each mount is actually necessary or useful. +#sudo umount /mnt/nas/iscsi +#sudo iscsiadm --mode node --targetname "iqn.2020-03.net.jafner:fighter" --portal "192.168.1.10:3260" --logout +#for mount in media calibre-web torrenting av; do sudo umount /mnt/nas/$mount; done sudo shutdown now \ No newline at end of file diff --git a/fighter/scripts/startup.sh b/fighter/scripts/startup.sh index 0f752eb..51144be 100644 --- a/fighter/scripts/startup.sh +++ b/fighter/scripts/startup.sh @@ -78,11 +78,12 @@ for stack in /home/admin/homelab/fighter/config/*; do if ! $MISSING_SHARES; then echo " ====== Bringing up" STACKS_ONLINE+="$(echo $stack | xargs basename)\n" - echo -n " ====== Time: " + echo -n " ======== Time: " ( time docker compose --progress quiet up -d ) 2>&1 | grep real | cut -f 2 echo " ====== Done!" else echo " ====== Missing needed network shares. Skipping." + STACKS_SKIPPED+="$(echo $stack | xargs basename)\n" fi cd /home/admin/homelab/fighter/config/ @@ -92,6 +93,8 @@ done echo " ==== List of stacks online:" echo -e "$STACKS_ONLINE" +echo " ==== List of stacks skipped:" +echo -e "$STACKS_SKIPPED" # extra thing because my keycloak healthcheck doesn't work properly echo " ==== Wait 15s, then bring Keycloak forwardauth containers online"