diff options
author | root <root@rshg054.dnsready.net> | 2012-08-18 00:02:28 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-08-18 00:02:28 +0000 |
commit | 948da5eabcbf8d74270e661d0730ba1c203913f5 (patch) | |
tree | 8536fd0b4622f9f6c77cb4716bf5c315c457038a /testing/git/git.install | |
parent | bbf2c63849bdf1654e767058f277da2e983c5f0b (diff) |
Sat Aug 18 00:02:28 UTC 2012
Diffstat (limited to 'testing/git/git.install')
-rw-r--r-- | testing/git/git.install | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/git/git.install b/testing/git/git.install new file mode 100644 index 000000000..9edc065ba --- /dev/null +++ b/testing/git/git.install @@ -0,0 +1,22 @@ +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 + passwd -l git >/dev/null + 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 +} |