Skip to content

Commit

Permalink
bug-fix:
Browse files Browse the repository at this point in the history
- SD-Cardのファイル自動削除が正しく動いていなかった
  • Loading branch information
mnakada committed Dec 5, 2022
1 parent cff0066 commit 0b673e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions overlay_rootfs/scripts/remove_old.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ HOSTNAME=`hostname`

if [ "$STORAGE_SDCARD_REMOVE" = "on" ] && [ "$STORAGE_SDCARD_REMOVE_DAYS" != "" ]; then
if [ "$STORAGE_SDCARD" = "on" -o "$STORAGE_SDCARD" = "alarm" ]; then
find /media/mmc/alarm_record -depth -type f -mtime $STORAGE_SDCARD_REMOVE_DAYS -delete
find /media/mmc/alarm_record -depth -type f -mtime +$STORAGE_SDCARD_REMOVE_DAYS -delete
find /media/mmc/alarm_record -depth -type d -mmin +3 -empty -delete
fi
if [ "$STORAGE_SDCARD" = "on" -o "$STORAGE_SDCARD" = "record" ]; then
find /media/mmc/record -depth -type f -mtime $STORAGE_SDCARD_REMOVE_DAYS -delete
find /media/mmc/record -depth -type f -mtime +$STORAGE_SDCARD_REMOVE_DAYS -delete
find /media/mmc/record -depth -type d -mmin +3 -empty -delete
fi
if [ "$STORAGE_SDCARD" = "on" -o "$STORAGE_SDCARD" = "record" -o "$STORAGE_SDCARD" = "alarm" ]; then
find /media/mmc/time_lapse -depth -type f -mtime $STORAGE_SDCARD_REMOVE_DAYS -delete
find /media/mmc/time_lapse -depth -type f -mtime +$STORAGE_SDCARD_REMOVE_DAYS -delete
find /media/mmc/time_lapse -depth -type d -mmin +3 -empty -delete
fi
fi
Expand Down

0 comments on commit 0b673e0

Please sign in to comment.