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