4. Running radiusd

radiusd is the Radiator RADIUS server. At start-up, radiusd tries to open its configuration file. If the file can not be opened, radiusd exits. After the configuration has been read, radiusd finishes its start-up. It can change its user and group, create a PID file and do other work depending on the configuration. The location of configuration file and PID file, if PID file is written at all, and many other settings can be changed with command line and configuration file options.

Signals

If radiusd is signalled with SIGHUP, it reinitialises by rereading the configuration file. All Clients, Realms, Handlers, and the others defined in the old configuration file are lost, and new ones are configured. The effect of SIGHUP is expected to be the same as if you killed and then restarted radiusd.
If radiusd is signalled with SIGTERM, it exits gracefully.
If radiusd is signalled with SIGUSR1, it increases its current Trace level by 1. SIGUSR2 decreases it by one.

Environment variables

Environment variables can be used to add Radiator location to Perl module search path. It's possible to add new paths before and after the default search paths. See also -I command line option for adding to module path.
  • PERL5LIB is processed by the Perl interpreter. These paths are prepended to the module search path before radiusd is started.
  • RADIATOR_INC, RADIATOR_INC_CARRIER, RADIATOR_INC_DIAMETER, RADIATOR_INC_GBA_BSF and RADIATOR_INC_SIM are appended to the module search path. They are processed immediately by radiusd when it starts.
PERL5LIB is the recommended environment variable for modifying module search path. Radiator packages that come in RPM, deb and other formats, do not set this variable. Radiator packages use environment variables starting with RADIATOR_INC. The value of these should be a single directory currently.
Tip
Value of PERL5LIB is a list of directories. The list separator depends on the platform, and it is a colon ':' on unix or a semicolon ';' on Windows.

Command line arguments

Command line arguments given to radiusd override global configuration parameter settings in the configuration file. For more information, see Section 3.7. Global parameters.
The arguments are:
radiusd [-I dirname] [-h] [-v] [-c]
    [-auth_port port,...] [-acct_port port,...] 
    [-db_dir dirname] [-log_dir dirname]
    [-bind_address address,...]
    [-log_file filename] [-config_file filename] [-dictionary_file file,...]
    [-foreground] [-daemon] [-log_stdout] [-trace n] 
    [-pid_file filename] [-no_pid_file]
    [-service] [-installservice] [-uninstallservice] [-servicename name]
    [-serviceperlargs perlargs]
    [globalvarname=value]
  • -h
    This prints usage information and exits.
  • -I dirname
    This prepends dirname to the module search path. This parameter is processed by radiusd before any environment variables that start with RADIATOR_INC.
  • -v
    This prints version information and exits.
  • -c
    This parses the configuration file, reports errors in the usual way, then exits.
  • -auth_port port,...
    This specifies the ports to listen for Access-Requests and overrides AuthPort.
  • -acct_port port,...
    This specifies the ports to listen for Accounting-Requests and overrides AcctPort.
  • -db_dir dirname
    This specifies the database directory and overrides DbDir.
  • -log_dir dirname
    This specifies the log file directory and overrides LogDir.
  • -log_file filename
    This specifies the name of the log file and overrides LogFile.
  • -config_file filename
    This reads the filename as the configuration file. The default value depends on the operating system:
    • Unix: /etc/radiator/radius.cfg
    • Windows: C:\Program Files\Radiator\radius.cfg
  • -dictionary_file filename,...
    This specifies the name of one or more dictionary file and overrides DictionaryFile.
  • -foreground
    This runs radiusd in the foreground, not as a daemon. The default behaviour is to run as a daemon.
  • -daemon
    This forces radiusd to run as a daemon in the background, regardless of the setting of Foreground in the configuration file..
  • -log_stdout
    This logs to STDOUT as well as to LogFile, if running in the foreground.
  • -trace n
    This sets the trace level to n and overrides Trace.
  • -pid_file filename
    This writes the PID to filename and overrides the global PidFile parameter setting. If this is not set, the PidFile configuration parameter value is used. For more information, see Section 3.7.15. PidFile.
  • -no_pid_file
    This prevents creating a PID file.
  • -bind_address address,...
    This specifies one or more IPv4 or IPv6 addresses to listen on and overrides BindAddress. For more information, see Section 3.5. Address binding.
  • -service
    This is for specialised use on Windows only. It tells Radiator to run as a Windows Service. It requires Win32::Daemon, and requires that the service have been previously installed with -installservice.
  • -installservice
    On Windows, this installs or reinstalls Radiator to run as a Windows Service. The service is configured to run Radiator with all the same arguments as was passed with -installservice, and it adds the -service flag. After this, the Radiator service appears in the Windows Service list as 'Radiator Radius Server'. The Service automatically starts next time the host is booted. Using this requires Win32::Daemon.
    On Windows 7 and others, the command prompt needs to be started with right click -> "Run as administrator". Otherwise the service does not get installed, even if the user has administrator privileges.
  • -uninstallservice
    On Windows, this removes Radiator from Running as a Windows Service. Ensure the service is stopped before uninstalling it. This requires Win32::Daemon. If a -servicename argument was used with -installservice, then the same -servicename argument must be used to uninstall the service.
  • -servicename
    On Windows, if Radiator is being installed or uninstalled as a service, this argument specifies the name that the service is installed under. The default value is 'Radiator'. Specifying a different service name allows multiple Radiator services to be run at the same time.
  • -serviceperlargs args
    On Windows, if Radiator is being installed or uninstalled as a service, this argument specifies extra arguments to pass to Perl when the service starts. This is useful for specifying an alternative install directory for the Radiator Perl modules:
    perl c:/Radiator/radiusd -installservice -serviceperlargs "-I
    c:/Radiator"
  • globalvarname=value
    Defines the global variable called globalvarname to be defined as the string "value". The value can be accessed anywhere special formatting characters are permitted with %{GlobalVar:globalvarname}. This argument has exactly the same effect as the following setting in the configuration file:
    DefineFormattedGlobalVar globalvarname value