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:
Kevin Fenzi 2016-05-19 19:05:16 +00:00
parent bfc89c2762
commit 7b2a5482bf
2 changed files with 30 additions and 0 deletions

View 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