This site is deprecated; docs have moved to docs.inspircd.org!
Command Line Parameters
The InspIRCd Binary
The inspircd binary (in bin/inspircd) accepts the following parameters:
- --nofork - Do not fork to the background on startup, useful for debugging modules
- --nolog - Do not write to the logfile, used mostly in conjunction with -debug
- --debug - Force debug logging, overriding the config setting. Usually used with -nolog by the debug launcher
- --logfile <filename> - Change the logfile used
- --config <filename> - Change the file name used for the main configuration file
- --version - Show the version and revision ID
- --runasroot - Allow InspIRCd to run as root, after a short pause and a nag banner to prevent this being done accidentally (NOT RECOMMENDED OR SUPPORTED!)
The ./inspircd Script
The startup script (in the main InspIRCd directory) is a perl script used to easily launch InspIRCd, and supports the following parameters:
- start - Starts the IRCd
- stop - Stops a running IRCd
- rehash - Rehashes a running IRCd
- cron - Starts the IRCd if it is not running, otherwise does nothing
- restart - Restarts a running IRCd
- debug - Launches the IRCd within the gdb debugger, if installed
- status - Displays the status of InspIRCd (started, stopped), for example:
[[email protected]:inspircd]$ ./inspircd status InspIRCd is running (PID: 18395)
On exiting, InspIRCd will return one of the following exit codes to the shell.
- 0. EXIT_STATUS_NOERROR - No error occurred - The ircd forked into the background, or terminated normally.
- 1. EXIT_STATUS_DIE - An IRC operator issued the /DIE command.
- 2. EXIT_STATUS_FAILED_EXEC - When restarting, the execv() call failed.
- 3. EXIT_STATUS_INTERNAL - An internal error occurred.
- 4. EXIT_STATUS_CONFIG - The process could not open, or could not parse the configuration file.
- 5. EXIT_STATUS_LOG - The process could not open the log file.
- 6. EXIT_STATUS_FORK - The process was told to fork, and could not.
- 7. EXIT_STATUS_ARGV - Bad arguments were given on the command line.
- 8. EXIT_STATUS_BIND - Process could not bind to any ports, and ports were configured.
- 9. EXIT_STATUS_PID - Process could not write the PID file.
- 10. EXIT_STATUS_SOCKETENGINE - Process could not initialize socket engine.
- 11. EXIT_STATUS_ROOT - Process was started as root.
- 12. EXIT_STATUS_DIETAG - Process found a die tag in the configuration file.
- 13. EXIT_STATUS_MODULE - Process could not load a required module on startup.
- 15. EXIT_STATUS_SIGTERM - Process received a SIGTERM (kill).
NOTE: The fact that 14 is skipped is not a typo. EXIT_STATUS_SIGTERM is set to 15 to match the OS-defined value of SIGTERM, and there are only 14 other error values.