aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeradius/setup-freeradius.in
diff options
context:
space:
mode:
Diffstat (limited to 'main/freeradius/setup-freeradius.in')
-rw-r--r--main/freeradius/setup-freeradius.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/main/freeradius/setup-freeradius.in b/main/freeradius/setup-freeradius.in
new file mode 100644
index 0000000000..b6cad29f24
--- /dev/null
+++ b/main/freeradius/setup-freeradius.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -eu
+
+DEFAULT_MODULES='@@DEFAULT_MODULES@@'
+
+case "${1:-}" in
+ '' | -h | --help)
+ cat >&2 <<-EOF
+ Usage: $0 [-h | <action>]
+
+ Actions:
+ enable-default-mods Enable all default modules (i.e. create
+ symlinks in /etc/raddb/mods-enabled).
+
+ EOF
+ exit 2
+ ;;
+ enable-default-mods)
+ for mod in $DEFAULT_MODULES; do
+ ln -sv ../mods-available/$mod /etc/raddb/mods-enabled/$mod || true
+ done
+ ;;
+esac