The proposed fix is to do a similar thing that what has been done by
Neil for issue #1266: use a hidden option to check whether the server
is already running or not. If the server is not running the message
'Server already stopped' is displayed, if the server is running the message 'Stopping Server... is displayed'.
So the output of the command with this changes is:
If the server is running
========================
bash-3.00$ bin/stop-ds --restart
Stopping Server...
[23/Feb/2007:17:00:28 +0100] category=CORE severity=NOTICE id=458886
msg="OpenDS Directory Server 0.1.0 starting up."
[23/Feb/2007:17:00:34 +0100] category=BACKEND severity=NOTICE id=8847402
msg="A database backend containing 1 entries has started."
[23/Feb/2007:17:00:34 +0100] category=CONFIG severity=SEVERE_WARNING
id=3277325 msg="Access control has been disabled."
[23/Feb/2007:17:00:35 +0100] category=CORE severity=NOTICE id=458887
msg="The Directory Server has started successfully."
[23/Feb/2007:17:00:35 +0100] category=CORE severity=NOTICE id=458891
msg="The Directory Server has sent an alert notification generated by
class org.opends.server.core.DirectoryServer (alert type
org.opends.server.DirectoryServerStarted, alert ID 458887): The
Directory Server has started successfully.."
bash-3.00$
bash-3.00$ bin/stop-ds
If the server is stopped
========================
bash-3.00$ bin/stop-ds
Server already stopped.
bash-3.00$ bin/stop-ds --restart
Server already stopped.
[23/Feb/2007:16:59:50 +0100] category=CORE severity=NOTICE id=458886
msg="OpenDS Directory Server 0.1.0 starting up."
[23/Feb/2007:16:59:55 +0100] category=BACKEND severity=NOTICE id=8847402
msg="A database backend containing 1 entries has started."
[23/Feb/2007:16:59:56 +0100] category=CONFIG severity=SEVERE_WARNING
id=3277325 msg="Access control has been disabled."
[23/Feb/2007:16:59:57 +0100] category=CORE severity=NOTICE id=458887
msg="The Directory Server has started successfully."
[23/Feb/2007:16:59:57 +0100] category=CORE severity=NOTICE id=458891
msg="The Directory Server has sent an alert notification generated by
class org.opends.server.core.DirectoryServer (alert type
org.opends.server.DirectoryServerStarted, alert ID 458887): The
Directory Server has started successfully.."