From 6c5e4df8c6a8c52e710e0213102f505373b8eee1 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Sun, 11 Feb 2024 16:31:28 -0800 Subject: [PATCH] Init shutdown script, add empty newline to SHUTDOWN.md --- fighter/SHUTDOWN.md | 2 +- fighter/scripts/shutdown.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 fighter/scripts/shutdown.sh diff --git a/fighter/SHUTDOWN.md b/fighter/SHUTDOWN.md index 492fc5a..b5cd553 100644 --- a/fighter/SHUTDOWN.md +++ b/fighter/SHUTDOWN.md @@ -4,4 +4,4 @@ 2. Unmount the iSCSI device. Run `sudo umount /mnt/iscsi`. 3. Log out of the iSCSI session. Run `sudo iscsiadm --mode node --targetname "iqn.2020-03.net.jafner:fighter" --portal "192.168.1.10:3260" --logout`. 4. Unmount the SMB shares. Run `for mount in media calibre-web torrenting av; do sudo umount /mnt/nas/$mount; done`. This command may need updating for the specific SMB shares currently mounted. -5. Shut down the system. Run `sudo shutdown now`. \ No newline at end of file +5. Shut down the system. Run `sudo shutdown now`. diff --git a/fighter/scripts/shutdown.sh b/fighter/scripts/shutdown.sh new file mode 100644 index 0000000..ad67522 --- /dev/null +++ b/fighter/scripts/shutdown.sh @@ -0,0 +1,6 @@ +#!/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 +sudo shutdown now \ No newline at end of file