MarkGrimwood / Mognet-All-Sky-Camera-install

Software for a simple Raspberry Pi based all sky camera
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

Wildcard image clear not working #17

Closed MarkGrimwood closed 2 years ago

MarkGrimwood commented 2 years ago

Turning off the household power for a while recently without shutting the cameras down cleanly left a daytime image which is now now not being removed from the directory and is added to movies for each daytime

The problem is at lines 77-78, which looks like it should work but doesn't seem to

# Make sure there are no old images hanging around before we start sudo rm -f "$WORKPATH/webcam*.jpg"

Perhaps convert to get explicit names into a list before deleting

MarkGrimwood commented 2 years ago

Looks like this will fix it

for ITEM in $(ls $WORKPATH/webcam*.jpg) do sudo rm "$ITEM" done

MarkGrimwood commented 2 years ago

Fixed now and code updated