blob: 8ec764b816bd959d5a4b273d6a9c22b3a121f2f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
post_install() {
groupadd -r radiusd
useradd -r -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
chown -R radiusd:radiusd etc/raddb
}
systemd-tmpfiles --create freeradius.conf
}
post_remove() {
userdel radiusd
grep "^radiusd:" etc/group >/dev/null && groupdel radiusd
systemd-tmpfiles --create freeradius.conf
echo "-- You may want to remove /var/lib/radiusd and /etc/raddb"
}
|