diff options
| author | Kevin Fenzi <kevin@scrye.com> | 2016-05-19 19:05:16 +0000 |
|---|---|---|
| committer | Kevin Fenzi <kevin@scrye.com> | 2016-05-19 19:05:16 +0000 |
| commit | 7b2a5482bfe3138a3244bcb5a0b83346fb1fb5f1 (patch) | |
| tree | cca9e071b467b21864d5fe01eaacabe77612f9ec /files/scripts | |
| parent | bfc89c276249395ed2966df1a36be427bce5f7d8 (diff) | |
| download | ansible-7b2a5482bfe3138a3244bcb5a0b83346fb1fb5f1.tar.gz ansible-7b2a5482bfe3138a3244bcb5a0b83346fb1fb5f1.tar.xz ansible-7b2a5482bfe3138a3244bcb5a0b83346fb1fb5f1.zip | |
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.
Diffstat (limited to 'files/scripts')
| -rwxr-xr-x | files/scripts/update-fullfiletimelist | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/files/scripts/update-fullfiletimelist b/files/scripts/update-fullfiletimelist new file mode 100755 index 000000000..26ea2f4f6 --- /dev/null +++ b/files/scripts/update-fullfiletimelist @@ -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 |
