summarylogtreecommitdiffstats
path: root/git-git.install
blob: 3680c79dbf2d3063878959126e1701364fdf79d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

post_install() {
  systemd-sysusers git.conf

  if ! grep -qe '^/usr/bin/git-shell$' etc/shells; then
    echo '/usr/bin/git-shell' >> etc/shells
  fi

  chsh -s /usr/bin/git-shell git
}

post_upgrade() {
  post_install $1
}

post_remove() {
  sed -i -r '/^\/usr\/bin\/git-shell$/d' etc/shells
}