7 LOCK_FILE
="/tmp/gitwebcache-$cfg_tmpsuffix.lock"
9 # Make sure we don't run twice.
10 if [ -s "$LOCK_FILE" ] && kill -0 "$(cat "$LOCK_FILE")" 2>/dev
/null
; then
11 echo "Already running gitwebcache.sh (stuck?) with pid $(cat "$LOCK_FILE")" >&2
14 trap 'rm -f "$LOCK_FILE"' EXIT
21 # Re-generate the cache; we must be in same group as cgi user and
22 # $cache_grpshared must be 1.
23 # We get rid even of stderr since it's just junk from broken repos.
24 # We must set REQUEST_METHOD or gitweb.cgi will bail early
25 REQUEST_METHOD
=HEAD
&& export REQUEST_METHOD
26 perl
-e 'do "./gitweb.cgi"; END {
27 fill_project_list_info([], "rebuild-cache") }' >/dev
/null
2>&1