Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Preserving listing of taks files
Browse files Browse the repository at this point in the history
Adding shell code to copy the listing of task files (.zip) generated by the system as result of API data download requests
  • Loading branch information
SERVIRglobal committed Dec 21, 2018
1 parent 094ab5b commit 9f58504
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ index0.txt



.idea/ClimateSERV.iml
.idea/misc.xml
.idea/modules.xml
11 changes: 10 additions & 1 deletion cserv/pythonCode/serviringest/sh/operational/fetch_log.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash
# Copies apache log files from the previous day to the ClimateSERV logs/apache directory
# Author: FD - 2018-12-18
# Stores listings of task files in the /data/zipout/Zipfile_Storage and /data/zipout/Zipfile_Scratch directories
# Author: FD - 2018-12-20

# Fetching apache log files

LOGDIR="/data/data/logs/apache"
DATESTAMP=$(date -d '-1 days' -I)
ACCESSFILE="$LOGDIR/$DATESTAMP.access.log"
Expand All @@ -13,3 +17,8 @@ chmod a+r $ACCESSFILE
chmod a+r $ERRORFILE
chmod a+r $OTHERFILE

# Generates listing for current day
DATESTAMP=$(date -I)
ls /data/data/zipout/Zipfile_Storage -l --time-style=long-iso -t > /data/data/logs/tasks/$DATESTAMP.tasks.log
ls /data/data/zipout/Zipfile_Scratch -l --time-style=long-iso -t >> /data/data/logs/tasks/$DATESTAMP.tasks.log
chmod a+r $DATESTAMP.tasks.log

0 comments on commit 9f58504

Please sign in to comment.