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