All pastes #535849 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-04 06:04 UTC
rendered paste body
#!/bin/sh

LINK=${1:-klickitat}
VALUE=${2:-loss}

DIR=/tmp/linkstats
TARGET=${DIR}/${LINK}-${VALUE}

if [ ! -f ${TARGET} ] || [ $(expr $(date +%s) "-" $(date -r ${TARGET} +%s)) -ge 60 ]; then
    /usr/local/bin/compute-stats.sh ${LINK}
fi

cat ${TARGET}