Package org.opends.server.tools
Class CreateRcScript
- java.lang.Object
-
- com.forgerock.opendj.cli.Tool
-
- org.opends.server.tools.CreateRcScript
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class CreateRcScript extends com.forgerock.opendj.cli.ToolThis program provides a tool that may be used to generate an RC script that can be used to start, stop, and restart the Directory Server, as well as to display its current status. It is only intended for use on UNIX-based systems that support the use of RC scripts in a location like /etc/init.d.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)Parse the command line arguments and create an RC script that can be used to control the server.static intmainCreateRcScript(String[] args, PrintStream outStream, PrintStream errStream)Processes the command-line arguments and creates an RC script that can be used to control the server.com.forgerock.opendj.cli.ReturnCoderun(String... args)Parse the command line arguments and create an RC script that can be used to control the server.-
Methods inherited from class com.forgerock.opendj.cli.Tool
askPort, close, confirmAction, enableConsoleLoggingIfVerbose, errPrintln, errPrintln, errPrintln, errPrintlnSurroundedByBlankLines, errPrintVerboseMessage, flush, flushLogStream, getErrorStream, getErrStream, getInputStream, getOutputStream, isFullyInteractive, isQuiet, isScriptFriendly, isVerbose, logVerboseMessage, mayPrompt, parseArguments, pressReturnToContinue, print, println, println, println, printlnNoWrap, printlnSurroundedByBlankLines, printNoWrap, readInput, readInput, readInputAllowEmpty, readLineOfInput, readPassword, readValidatedInput, readValidatedInputOrThrow, report
-
-
-
-
Method Detail
-
main
public static void main(String[] args)
Parse the command line arguments and create an RC script that can be used to control the server.- Parameters:
args- The command-line arguments provided to this program.
-
mainCreateRcScript
public static int mainCreateRcScript(String[] args, PrintStream outStream, PrintStream errStream)
Processes the command-line arguments and creates an RC script that can be used to control the server.- Parameters:
args- The command-line arguments provided to this program.outStream- The output stream to use for standard output, ornullif standard output is not needed.errStream- The output stream to use for standard error, ornullif standard error is not needed.- Returns:
- The tool return code.
-
run
public com.forgerock.opendj.cli.ReturnCode run(String... args) throws com.forgerock.opendj.cli.ClientException
Parse the command line arguments and create an RC script that can be used to control the server.- Overrides:
runin classcom.forgerock.opendj.cli.Tool- Parameters:
args- The command-line arguments provided to this program.- Returns:
0if all processing completed successfully, or non-zero if an error occurred.- Throws:
com.forgerock.opendj.cli.ClientException- If an error occurs while running the tool.
-
-