summaryrefslogtreecommitdiff
path: root/pcr/trytond/trytond.install
blob: 46d6daabadd066af233ebdf2d586f78b17e405df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
post_install() {
  echo
  echo "Adding tryton group... "
  groupadd  tryton
  echo
  echo "Adding tryton user... "
  useradd -c "Tryton Server Daemon" -g tryton -s /bin/false tryton

  echo "Note:"
  echo "==> Please don't forget to configure your PostgreSQL database for the program."
}

post_remove() {
  echo "Removing tryton system user... "
  userdel tryton && echo "trytond [done]"
}

op=$1
shift
[ "$(type -t "$op")" = "function" ] && $op "$@"