summaryrefslogtreecommitdiff
path: root/community/freeradius/freeradius.install
blob: e50aa403dac4411c3926ab0287b861bd8d3fe081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_install() {
    groupadd radiusd
    useradd -m -d /var/lib/radiusd -g radiusd -s /bin/false radiusd

    touch /var/log/radius/radius.log
    chown -R radiusd.radiusd /var/log/radius/radius.log

    [ -d /etc/raddb ] || cp -a /etc/raddb.default /etc/raddb

    /bin/true
}

pre_remove() {
    /etc/rc.d/radiusd stop
    /bin/true
}

post_remove() {
    userdel radiusd
    groupdel radiusd
    /bin/true
}