diff options
author | root <root@rshg054.dnsready.net> | 2012-08-23 00:03:08 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-08-23 00:03:08 +0000 |
commit | c40883520f917311c212dc4a22e86be30cef658f (patch) | |
tree | ef8badd68c32564574e9b9317db1884fdaf98d2f /extra/git/git.install | |
parent | 297a042ac9a7bbd2b18a9551f5fa4fe43faf53b2 (diff) |
Thu Aug 23 00:03:08 UTC 2012
Diffstat (limited to 'extra/git/git.install')
-rw-r--r-- | extra/git/git.install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/git/git.install b/extra/git/git.install new file mode 100644 index 000000000..c0578dc1d --- /dev/null +++ b/extra/git/git.install @@ -0,0 +1,21 @@ +post_install() { + if ! getent group git >/dev/null; then + groupadd --system git + fi + if ! getent passwd git >/dev/null; then + useradd --system -c 'git daemon user' -g git -d / -s /bin/bash git + fi +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + if getent passwd git >/dev/null; then + userdel git + fi + if getent group git >/dev/null; then + groupdel git + fi +} |