Sysadmin/Autocheckout repositories: Difference between revisions

Created page with "Configuration for a number of services, including Service/Nameservers and Service/planet, is stored in git repositories intended to be edited concurrently by the sysadmin..."
 
No edit summary
 
Line 26: Line 26:
         sharedRepository = true
         sharedRepository = true
         logallrefupdates = true
         logallrefupdates = true
        #worktree = /etc/bind
  [receive]
  [receive]
         denycurrentbranch = ignore
         denycurrentbranch = ignore
Line 38: Line 38:
* We use a post-receive hook to checkout changes to the work tree and signal daemons to reload the configuration
* We use a post-receive hook to checkout changes to the work tree and signal daemons to reload the configuration


  #!/bin/bash
  #!/bin/bash -x
  /bin/bash /usr/share/doc/git-core/contrib/hooks/post-receive-email
  #
# note: this script runs with .git as cwd and GIT_DIR=.
#
hooks/post-receive-email
cd ..
unset GIT_DIR
  git checkout -f
  git checkout -f
# reload daemons here