How do you capture the startServer and stopServer return code to determine if this was successful or not? This table shows the return codes for a server given a start or stop command.
#!/bin/sh exitCode=`./startServer.sh server1`
Server state | Return code |
Server initialization failed | -1 |
Server initialization timed out | -2 |
Server start in progress | 1 |
Server is initializing the applications that are present | 2 |
Server initialization is complete (successful) | 0 |
Server stop failed | -10 |
Server stop timed out | -11 |
Server stop operation started | 1000 |
Server successfully stopped | 0 |