summaryrefslogtreecommitdiff
path: root/testing/git/git.install
blob: 9edc065ba755af9324d5792609845de68ab04586 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
}