summaryrefslogtreecommitdiff
path: root/extra/git/git.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/git/git.install')
-rw-r--r--extra/git/git.install21
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
+}