Moved to RST format.
[freeradius.git] / doc / Acct-Type.rst
index 9e12d4f..0c8d3ad 100644 (file)
@@ -1,3 +1,6 @@
+Acct-Type
+=========
+
 FreeRADIUS supports the Acct-Type attribute to select between
 accounting methods based on arbitrary attribute/value pairs contained
 in an accounting packet. Its use follows the same general configuration
@@ -17,55 +20,52 @@ addition, there is one RADIUS client sending accounting data that is
 to be logged only to a specific detail file. Everything else should
 use a third SQL instance.
 
-The acct_users file would look something like this:
-
----
-DEFAULT Realm == "foo.com", Acct-Type := "SQLFOO"
+The acct_users file would look something like this::
 
-DEFAULT Realm == "bar.com", Acct-Type := "SQLBAR"
+  DEFAULT Realm == "foo.com", Acct-Type := "SQLFOO"
+  
+  DEFAULT Realm == "bar.com", Acct-Type := "SQLBAR"
 
-DEFAULT Client-IP-Address == "10.0.0.1", Acct-Type := "OTHERNAS"
----
+  DEFAULT Client-IP-Address == "10.0.0.1", Acct-Type := "OTHERNAS"
 
-And in radiusd.conf:
----
-$INCLUDE  ${confdir}/sql0.conf # Instance named 'sql0'.
-$INCLUDE  ${confdir}/sql1.conf # Instance named 'sql1'.
-$INCLUDE  ${confdir}/sql2.conf # Instance named 'sql2'.
+And in radiusd.conf::
 
-detail othernas {
+  $INCLUDE  ${confdir}/sql0.conf # Instance named 'sql0'.
+  $INCLUDE  ${confdir}/sql1.conf # Instance named 'sql1'.
+  $INCLUDE  ${confdir}/sql2.conf # Instance named 'sql2'.
+  
+  detail othernas {
         detailfile = ${radacctdir}/10.0.0.1/detail-%Y%m%d
-}
-
-preacct {
+  }
+  
+  preacct {
         suffix # Add the Realm A/V pair.
         files  # Add the Acct-Type A/V pair based on the Realm A/V pair.
-}
-
-accounting {
-
+  }
+  
+  accounting {
+  
         # If Acct-Type is SQLFOO use the 'sql1' instance of the SQL module.
-
+  
         Acct-Type SQLFOO {
                 sql1
         }
-
+  
         # If Acct-Type is SQLBAR, use the 'sql2' instance of the SQL module.
-
+  
         Acct-Type SQLBAR {
                 sql2
         }
-
+  
         # If Acct-Type is OTHERNAS, use the 'othernas' instance of the detail
         # module
-
+  
         Acct-Type OTHERNAS {
                 othernas
         }
-
+  
         # If we've made it this far, we haven't matched an Acct-Type, so use
         # the sql0 instance.
-
+  
         sql0
-}
----
+  }