summaryrefslogtreecommitdiffstats
path: root/debian/freeradius-common.postinst
blob: df3e9dbbaa681551733ad3d9853579f334a54526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# vim:ts=2:sw=2:et

set -e

case "$1" in
  configure)
    if [ -z "$2" ]; then
      # On a fresh install, add the necessary user and group
      adduser --quiet --system --no-create-home --home /etc/freeradius --group --disabled-password freerad || true

      # Put user freerad in group shadow, so the daemon can auth locally
      # Only do this on fresh install as the admin may not want freerad in shadow
      # group if authenticating by another mechanism
      adduser --quiet freerad shadow
    fi
    ;;
esac

#DEBHELPER#

exit 0