-
Notifications
You must be signed in to change notification settings - Fork 0
/
script
executable file
·17 lines (17 loc) · 1.25 KB
/
script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
set -euo pipefail
while :
do
now=$(date +"%Y%m%d%H%M%S")
url=$(echo "$@" | rev | cut -d " " -f 1 | rev ) # obtain url from total list of arguments
parsedURL=$(echo $url | sed -e 's|^[^/]*//||' | cut -d "." -f 1) # remove protocol and only keep relevant name of url
length=${#parsedURL}
if [ $length -lt 4 ]; then
parsedURL=$(echo $url | sed -e 's|^[^/]*//||' | cut -d "." -f 2);
fi
/opt/encoded/checkfiles/venv/bin/python /opt/encoded/checkfiles/checkfiles.py "$@" --out $now-checkfiles-$parsedURL.log --err $now-checkfiles-error-$parsedURL.log --include-unexpired-upload 2> $now-file-errors-$parsedURL.log 1> $now-file-output-$parsedURL.log
# CHK-88 Temporarily pause running checkexperiments as it's not useful at this time
# /opt/encoded/checkfiles/bin/python /opt/encoded/checkfiles/checkexperiments.py "$@" --out $now-checkexperiments-$parsedURL.log --err $now-checkexperiments-error-$parsedURL.log 2> $now-exp-errors-$parsedURL.log 1> $now-exp-output-$parsedURL.log
/opt/encoded/checkfiles/venv/bin/python /opt/encoded/checkfiles/checkmd5.py "$@" --out $now-checkmd5-$parsedURL.log 2> $now-md5-errors-$parsedURL.log 1> $now-md5-output-$parsedURL.log
sleep 120m
done