summaryrefslogtreecommitdiff
path: root/community-testing/mailman/mailman.install
blob: 62a364e1af14c44334f3b48d676946e0bf0ee8db (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
26
27
28
29
#!/bin/sh

## arg 1:  the new package version
post_install() {
  if ! getent group mailman >/dev/null; then
    groupadd -g 80 mailman >/dev/null
  fi

  if ! getent passwd mailman >/dev/null; then
    useradd -s /sbin/nologin -c "GNU Mailing List Manager" -d /usr/lib/mailman \
      -u 80 -g mailman -M -r mailman >/dev/null
  fi
  # check file permissions
  cd /usr/lib/mailman && bin/check_perms > /dev/null
}

## arg 1:  the new package version
## arg 2:  the old package version
post_upgrade() {
  post_install "$1"
}

## arg 1:  the old package version
pre_remove() {
  userdel mailman >/dev/null || true
  groupdel mailman >/dev/null || true
}

# vim:set ts=2 sw=2 ft=sh et: