summaryrefslogtreecommitdiff
path: root/editpix.sh
diff options
context:
space:
mode:
authorst33v <github@f3rr3t.com>2018-01-08 20:00:06 +1100
committerst33v <github@f3rr3t.com>2018-01-08 20:00:06 +1100
commit04ac1a16a04a270b7538c6c4361596928c824d1b (patch)
tree16573ab8d284ee8487b3ddfbb4190acb196e7528 /editpix.sh
parentc8a9b8e67316b44f4d7aadbf2cf3b06ab5503ff4 (diff)
cleanup empty directories with FIND
Diffstat (limited to 'editpix.sh')
-rwxr-xr-xeditpix.sh4
1 files changed, 4 insertions, 0 deletions
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