mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
* mute errors due to failed incoming network connections * fix log entry formatting * Update cleanDanglingImages * Update cleanDanglingImages
10 lines
321 B
Bash
10 lines
321 B
Bash
#!/bin/bash
|
|
|
|
for image in $(find /root/resources/eos/ -type f -name '*.squashfs' -mmin +240 -exec realpath {} \;); do
|
|
if ! mount | grep "^$image" > /dev/null; then
|
|
>&2 echo "Removing dangling image: $image"
|
|
rm $image
|
|
fi
|
|
done
|
|
find /root/resources/eos -type d -empty -delete
|