Fix intended for issue 1432 (install fails to start opends).
The modifications only impact Windows when the service is configured. We must call net start and net stop even when the server is already running (or already stopped) to be sure that opends_service.exe is handled properly.
| | |
| | | isServerRunning = true; |
| | | } |
| | | |
| | | boolean configuredAsService = isRunningAsWindowsService(); |
| | | |
| | | if (isServerRunning) |
| | | { |
| | | returnValue = SERVER_ALREADY_STARTED; |
| | | if (configuredAsService && !windowsNetStartPresent) |
| | | { |
| | | returnValue = START_AS_WINDOWS_SERVICE; |
| | | } |
| | | else |
| | | { |
| | | returnValue = SERVER_ALREADY_STARTED; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | boolean configuredAsService = isRunningAsWindowsService(); |
| | | |
| | | if (configuredAsService) |
| | | { |
| | | if (noDetachPresent) |
| | |
| | | isServerRunning = true; |
| | | } |
| | | |
| | | boolean configuredAsService = |
| | | DirectoryServer.isRunningAsWindowsService(); |
| | | |
| | | if (!isServerRunning) |
| | | { |
| | | if (restartPresent) |
| | | if (configuredAsService && !windowsNetStopPresent) |
| | | { |
| | | if (restartPresent) |
| | | { |
| | | returnValue = RESTART_AS_WINDOW_SERVICE; |
| | | } |
| | | else |
| | | { |
| | | returnValue = STOP_AS_WINDOW_SERVICE; |
| | | } |
| | | } |
| | | else if (restartPresent) |
| | | { |
| | | returnValue = START_SERVER; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | boolean configuredAsService = |
| | | DirectoryServer.isRunningAsWindowsService(); |
| | | |
| | | if (configuredAsService) |
| | | { |
| | | if (windowsNetStopPresent) |