Update fighter startup/shutdown scripts
All checks were successful
Deploy to Fighter / Deploy (push) Successful in 37s
Deploy to Fighter / Notify (push) Successful in 4s

This commit is contained in:
Joey Hafner 2024-03-09 01:04:44 -08:00
parent 05194552d4
commit d53e974d7e
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
for stack in /home/admin/homelab/fighter/config/*; do cd $stack && docker compose down; done 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 ## I don't think unmounting each mount is actually necessary or useful.
for mount in media calibre-web torrenting av; do sudo umount /mnt/nas/$mount; done #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 sudo shutdown now

View File

@ -78,11 +78,12 @@ for stack in /home/admin/homelab/fighter/config/*; do
if ! $MISSING_SHARES; then if ! $MISSING_SHARES; then
echo " ====== Bringing up" echo " ====== Bringing up"
STACKS_ONLINE+="$(echo $stack | xargs basename)\n" 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 ( time docker compose --progress quiet up -d ) 2>&1 | grep real | cut -f 2
echo " ====== Done!" echo " ====== Done!"
else else
echo " ====== Missing needed network shares. Skipping." echo " ====== Missing needed network shares. Skipping."
STACKS_SKIPPED+="$(echo $stack | xargs basename)\n"
fi fi
cd /home/admin/homelab/fighter/config/ cd /home/admin/homelab/fighter/config/
@ -92,6 +93,8 @@ done
echo " ==== List of stacks online:" echo " ==== List of stacks online:"
echo -e "$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 # extra thing because my keycloak healthcheck doesn't work properly
echo " ==== Wait 15s, then bring Keycloak forwardauth containers online" echo " ==== Wait 15s, then bring Keycloak forwardauth containers online"