321f7113cce89ab3b5555fe2e7a1f677deadaf61 max Fri Apr 11 07:40:07 2014 -0700 Committing all config files for the browserbox, refs #11957 diff --git src/browserbox/root/cronCleanTmp.sh src/browserbox/root/cronCleanTmp.sh new file mode 100755 index 0000000..b9ab6b4 --- /dev/null +++ src/browserbox/root/cronCleanTmp.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# clean /tmp dir only if there is no rsync job running at the moment +# run from crontab + +RUNNING=`ps --no-headers -Crsync | wc -l` +if [ ${RUNNING} -gt 2 ]; then + echo rsync is running, not cleaning tmp + exit 0 +fi + +rm -f /tmp/*