summarylogtreecommitdiffstats
path: root/mercure.install
blob: 31b8c23438424bb93254ab2d897bc6f74e7c1be3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
post_install() {
  if [[ -z $(getent group mercure) ]]; then
    groupadd mercure
  fi

  if [[ -z $(getent passwd mercure) ]]; then
    useradd -c 'Mercure' -g mercure -d / -s /usr/bin/nologin mercure
  fi

  passwd -l mercure > /dev/null
}

post_upgrade() {
  post_install
}

post_remove() {
  if [[ -n $(getent passwd mercure) ]]; then
    userdel mercure
  fi

  if [[ -n $(getent group mercure) ]]; then
    groupdel mercure
  fi
}