Setup a cron job to update fulfiletimelist in alt. For now run every 6 hours, but once things settle down we can do more often.
This commit is contained in:
parent
bfc89c2762
commit
7b2a5482bf
2 changed files with 30 additions and 0 deletions
22
files/scripts/update-fullfiletimelist
Executable file
22
files/scripts/update-fullfiletimelist
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
# currently runs on secondary01 from cron to update alt
|
||||
|
||||
MOD=$1
|
||||
[ -z "$MOD" ] && {
|
||||
echo "usage: $0 <module>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# This is the new list with timestamps
|
||||
|
||||
TMPFILE=$(mktemp -p /tmp/)
|
||||
pushd /srv/pub/$MOD > /dev/null
|
||||
/usr/local/bin/create-filelist . > $TMPFILE
|
||||
if diff $TMPFILE fullfiletimelist > /dev/null; then
|
||||
rm -f $TMPFILE
|
||||
else
|
||||
mv $TMPFILE fullfiletimelist
|
||||
fi
|
||||
chmod 0644 fullfiletimelist
|
||||
popd > /dev/null
|
Loading…
Add table
Add a link
Reference in a new issue