summaryrefslogtreecommitdiff
path: root/debian/libeufin-nexus.postinst
blob: 454c1864e2f55be00e6d8a54c1c36f2de0f49b53 (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
30
31
32
33
34
35
36
37
#!/bin/bash

set -e

. /usr/share/debconf/confmodule

case "${1}" in
configure)

  if ! getent group libeufin-nexus >/dev/null; then
    addgroup --quiet --system libeufin-nexus
  fi

  # Create users if needed
  if ! getent passwd libeufin-nexus >/dev/null; then
    adduser --quiet \
      --system \
      --disabled-password \
      --no-create-home \
      --shell /bin/bash \
      --ingroup libeufin-nexus \
      --home /var/lib/libeufin-nexus \
      libeufin-nexus
  fi
  ;;

abort-upgrade | abort-remove | abort-deconfigure) ;;

*)
  echo "postinst called with unknown argument \`${1}'" >&2
  exit 1
  ;;
esac

#DEBHELPER#

exit 0