fix apache2 davlockdb path in chowns
[hcoop/scripts.git] / hcoop-git-maint
index e7c967f..3548a58 100755 (executable)
@@ -18,7 +18,7 @@ for user in $(ls -1 /var/cache/git); do
     fi
     gitpath=$(readlink /var/cache/git/$user)
     find -L $gitpath -noleaf -type d \
-        ! -regex '.*/\(refs\|objects\)\(/.*\|$\)' -exec \
+        -regex '.*/\(refs\|objects\|hooks\)\(/.*\|$\)' -prune -o -exec \
         sh -c "! { fs la {} | \
                    egrep '^ +system:anyuser .*r' > /dev/null; } && \
                rm -f /var/cache/git/$user 2>/dev/null" \; \
@@ -26,11 +26,12 @@ for user in $(ls -1 /var/cache/git); do
 done
 
 # Update cache of front page.
-cache=/var/local/lib/gitweb/indexcache.html
-wget -q -O $cache.tmp 'http://git.hcoop.net/?nocache=y'
-if test -s $cache.tmp; then
-    chmod a+r $cache.tmp
-    mv $cache.tmp $cache
-else
-    rm -f $cache.tmp
-fi
+# unused for a long while...
+# cache=/var/local/lib/gitweb/indexcache.html
+# wget -q --timeout 30 -O $cache.tmp 'http://git.hcoop.net/?nocache=y'
+# if test -s $cache.tmp; then
+#     chmod a+r $cache.tmp
+#     mv $cache.tmp $cache
+# else
+#     rm -f $cache.tmp
+# fi