From 04ac1a16a04a270b7538c6c4361596928c824d1b Mon Sep 17 00:00:00 2001 From: st33v Date: Mon, 8 Jan 2018 20:00:06 +1100 Subject: cleanup empty directories with FIND --- editpix.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editpix.sh b/editpix.sh index b399832..b722519 100755 --- a/editpix.sh +++ b/editpix.sh @@ -62,5 +62,9 @@ do touch bump-$(hostname) scp bump-$(hostname) ${web}/. rm transfer.jpg + + # cleanup any empty directories (such as when files are swept by another process) + find ${campi}/. -type d -empty -delete + # but DON'T delete the cam directories themselves. The cams expect them to exist. done #exit(0) # force success exit code for fussy systemd -- cgit v1.3