-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f898996
commit 17e4fd3
Showing
2 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
set -x | ||
|
||
echo Download webcams | ||
echo TODO implement logic | ||
lftp --help | ||
1>&2 echo 'Downloading webcam images' | ||
lftp -e "mirror -c --parallel=20 --verbose / /var/webcam; quit;" -u $IPL_WEBCAM_USER,$IPL_WEBCAM_PASSWORD $IPL_WEBCAM_SERVER | ||
# Delete all old webcam images | ||
find /var/webcam -mtime +$WEBCAM_KEEP_DAYS -type f -name '*.jpeg' -delete | ||
# Delete all empty directories | ||
find /var/webcam -type d -empty -delete |