| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.server.tools; |
| | |
| | | /** |
| | | * This class is used to configure the Windows service for this instance on |
| | | * this machine. |
| | | * This tool allows to enable and disable OpenDS to run as a Windows service |
| | | * and allows to know if OpenDS is running as a Windows service or not. |
| | | * This tool allows to enable and disable OpenDJ to run as a Windows service |
| | | * and allows to know if OpenDJ is running as a Windows service or not. |
| | | * |
| | | * Some comments about Vista: |
| | | * In Vista, when we launch the subcommands that require administrator |
| | |
| | | |
| | | /** |
| | | * Configures the Windows service for this instance on this machine. |
| | | * This tool allows to enable and disable OpenDS to run as a Windows service |
| | | * and allows to know if OpenDS is running as a Windows service or not. |
| | | * This tool allows to enable and disable OpenDJ to run as a Windows service |
| | | * and allows to know if OpenDJ is running as a Windows service or not. |
| | | * |
| | | * @param args The command-line arguments provided to this program. |
| | | */ |
| | |
| | | |
| | | /** |
| | | * Configures the Windows service for this instance on this machine. |
| | | * This tool allows to enable and disable OpenDS to run as a Windows service |
| | | * and allows to know if OpenDS is running as a Windows service or not. |
| | | * This tool allows to enable and disable OpenDJ to run as a Windows service |
| | | * and allows to know if OpenDJ is running as a Windows service or not. |
| | | * |
| | | * @param args The command-line arguments provided to this program. |
| | | * @param outStream the stream used to write the standard output. |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the service name associated with OpenDS or null if no service name |
| | | * Returns the service name associated with OpenDJ or null if no service name |
| | | * could be found. |
| | | * @return the service name associated with OpenDS or null if no service name |
| | | * @return the service name associated with OpenDJ or null if no service name |
| | | * could be found. |
| | | */ |
| | | static String getServiceName() |
| | |
| | | } |
| | | |
| | | /** |
| | | * Enables OpenDS to run as a windows service. |
| | | * Enables OpenDJ to run as a windows service. |
| | | * @param out the stream used to write the standard output. |
| | | * @param err the stream used to write the error output. |
| | | * @return <CODE>SERVICE_ENABLE_SUCCESS</CODE>, |
| | |
| | | } |
| | | |
| | | /** |
| | | * Enables OpenDS to run as a windows service. |
| | | * Enables OpenDJ to run as a windows service. |
| | | * @param out the stream used to write the standard output. |
| | | * @param err the stream used to write the error output. |
| | | * @param serviceName the name of the service as it will appear in the |
| | |
| | | } |
| | | |
| | | /** |
| | | * Disables OpenDS to run as a windows service. |
| | | * Disables OpenDJ to run as a windows service. |
| | | * @param out the stream used to write the standard output. |
| | | * @param err the stream used to write the error output. |
| | | * @return <CODE>SERVICE_DISABLE_SUCCESS</CODE>, |
| | |
| | | } |
| | | |
| | | /** |
| | | * Checks if OpenDS is enabled as a windows service and if it is |
| | | * Checks if OpenDJ is enabled as a windows service and if it is |
| | | * write the serviceName in the output stream (if it is not null). |
| | | * @param out the stream used to write the standard output. |
| | | * @param err the stream used to write the error output. |
| | |
| | | private static String getBinaryFullPath() |
| | | { |
| | | return SetupUtils.getScriptPath( |
| | | getServerRoot()+"\\lib\\opends_service.exe"); |
| | | getServerRoot()+"\\lib\\opendj_service.exe"); |
| | | } |
| | | |
| | | /** |