summaryrefslogtreecommitdiff
path: root/community-testing/freeradius/freeradius.install
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/freeradius/freeradius.install')
-rw-r--r--community-testing/freeradius/freeradius.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/community-testing/freeradius/freeradius.install b/community-testing/freeradius/freeradius.install
new file mode 100644
index 000000000..c3b9f9415
--- /dev/null
+++ b/community-testing/freeradius/freeradius.install
@@ -0,0 +1,22 @@
+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
+
+ /bin/true
+}
+
+pre_remove() {
+ /etc/rc.d/radiusd stop
+ /bin/true
+}
+
+post_remove() {
+ userdel radiusd
+ groupdel radiusd
+ /bin/true
+}