aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/freeradius2/freeradius_view_config.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/config/freeradius2/freeradius_view_config.php b/config/freeradius2/freeradius_view_config.php
index ee7ca4c1..e584a4ba 100644
--- a/config/freeradius2/freeradius_view_config.php
+++ b/config/freeradius2/freeradius_view_config.php
@@ -33,15 +33,9 @@
require("guiconfig.inc");
// Check to find out on which system the package is running
-if (exec("uname -r | cut -c 1-3") == '8.3') {
- if (exec("uname -m") == "i386") {
- define('RADDB', '/usr/pbi/freeradius-i386/etc/raddb');
- }
- else {
- define('RADDB', '/usr/pbi/freeradius-amd64/etc/raddb');
- }
-}
-else {
+if (substr(trim(file_get_contents("/etc/version")),0,3) == "2.1") {
+ define('RADDB', '/usr/pbi/freeradius-' . php_uname("m") . '/etc/raddb');
+} else {
define('RADDB', '/usr/local/etc/raddb');
}
// End of system check