#!/bin/sh # stick in .git/hooks/post-update and make executable echo "*** $USER: updating server info..." git update-server-info 2<&1 unset GIT_DIR cd .. # runs from .git/ echo "*** $USER: hard resetting..." git reset --hard 2<&1 echo "*** $USER: reloading lighttpd..." # on /etc/sudoers: # webmire ALL=NOPASSWD: /usr/sbin/service lighttpd reload sudo /usr/sbin/service lighttpd reload 2<&1 echo "*** $USER: post-update hook done ***"