From b269d3f46f299e1123dacbf6be25f44abe1a305b Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 7 Oct 2013 09:37:24 +0000 Subject: mgagit: Keep the post commit stuff out of /usr/local/bin --- deployment/mgagit/manifests/init.pp | 14 ++++++++++++-- deployment/mgagit/templates/git-post-receive-hook | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'deployment') diff --git a/deployment/mgagit/manifests/init.pp b/deployment/mgagit/manifests/init.pp index f440e7c9..2df95c42 100644 --- a/deployment/mgagit/manifests/init.pp +++ b/deployment/mgagit/manifests/init.pp @@ -47,12 +47,22 @@ class mgagit( content => template('mgagit/format-commit-email.sh'), } - mga_common::local_script { 'git_multimail.py': + file { "$gitolite_commonhooksdir/git_multimail.py": + ensure => present, + owner => $git_login, + group => $git_login, + mode => '0644', content => template('mgagit/git_multimail.py'), + require => File[$gitolite_commonhooksdir], } - mga_common::local_script { 'mgagit-post-receive-hook': + file { "$gitolite_commonhooksdir/post-receive": + ensure => present, + owner => $git_login, + group => $git_login, + mode => '0755', content => template('mgagit/git-post-receive-hook'), + require => File[$gitolite_commonhooksdir], } file { "$gitolite_commonhooksdir/post-update": diff --git a/deployment/mgagit/templates/git-post-receive-hook b/deployment/mgagit/templates/git-post-receive-hook index 01849ff4..72680d5a 100755 --- a/deployment/mgagit/templates/git-post-receive-hook +++ b/deployment/mgagit/templates/git-post-receive-hook @@ -4,7 +4,7 @@ import sys import os import re -LIBDIR = '/usr/local/bin' +LIBDIR = '<%= @gitolite_commonhooksdir %>' sys.path.insert(0, LIBDIR) import git_multimail -- cgit v1.2.1