From 3d17831e2782220f43ab9790d1972dd97c28a9e2 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Sat, 31 Jul 2021 19:21:26 -0500 Subject: adjust to properly umount --- clean-logs.sh | 3 +++ rog/usr/local/bin/local-cleanup.sh | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/clean-logs.sh b/clean-logs.sh index 5d79011..2d31c87 100755 --- a/clean-logs.sh +++ b/clean-logs.sh @@ -11,6 +11,9 @@ find /var/log/ -type f -name "*.gz" -exec rm -f {} \; find /var/log/ -type f -name "*.1" -exec rm -f {} \; find /var/log/ -type f -name "*.old" -exec rm -f {} \; +# rhel like logs with 8 digit date at the end +find /var/log -type f -regextype egrep -regex ".*-[0-9]{8}$" -exec rm -f {} \; + # clean systemd's journal if [[ -d /var/log/journal || -d /run/log/journal/ ]]; then systemctl stop systemd-journald diff --git a/rog/usr/local/bin/local-cleanup.sh b/rog/usr/local/bin/local-cleanup.sh index ff79960..0033ade 100755 --- a/rog/usr/local/bin/local-cleanup.sh +++ b/rog/usr/local/bin/local-cleanup.sh @@ -1,4 +1,6 @@ #!/bin/bash -umount /mnt/d/ +umount -q /mnt/d/ +umount /mnt/e +umount /mnt/dislocker #umount /mnt/dislocker2 -- cgit v1.2.3