reynico / raspberry-noaa

Fully automated ISS SSTV, NOAA and Meteor satellite image downloader using Raspberry PI
https://github.com/reynico/raspberry-noaa
GNU General Public License v3.0
179 stars 56 forks source link

prune.sh appears to remove all images/thumbs #134

Open mbruski opened 3 years ago

mbruski commented 3 years ago

Running prune.sh appears to delete all images/thumbnails, not just the oldest 10.

Reviewing the script, I can see where img_path gets set but not IMG_NAME. If IMG_NAME is not set, bash will treat it as a NULL string. Thus in the "find" statements ${IMG_NAME}.jpg is treated as .jpg and all images get selected and deleted.

jekhokie commented 3 years ago

Hey @mbruski - this is actually fixed in the v2 version of raspberry-noaa, in addition to adding some time-based pruning capability. You can check it out here: https://github.com/jekhokie/raspberry-noaa-v2

maxzega commented 3 years ago

hi Jekhokie, can you post the example sqlite3 script line to delete a specific image from the database? Thanks so much