version 1.34.2.10, 2001/12/05 23:21:02
|
version 1.34.2.11, 2001/12/06 19:51:05
|
|
|
////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////// |
| |
| |
|
#include <Pegasus/Common/Config.h> |
#include <iostream> | #include <iostream> |
#include <cassert> | #include <cassert> |
#include <cstdlib> | #include <cstdlib> |
|
|
usage.append (" -install - installs pegasus as a Windows NT Service\n"); | usage.append (" -install - installs pegasus as a Windows NT Service\n"); |
usage.append (" -remove - removes pegasus as a Windows NT Service\n"); | usage.append (" -remove - removes pegasus as a Windows NT Service\n"); |
usage.append (" -slp - registers pegasus as a service with SLP\n\n"); | usage.append (" -slp - registers pegasus as a service with SLP\n\n"); |
|
usage.append (" -SSL - uses SSL\n\n"); |
| |
usage.append (" configProperty=value\n"); | usage.append (" configProperty=value\n"); |
usage.append (" port=nnnn - sets port number to listen on\n"); | usage.append (" port=nnnn - sets port number to listen on\n"); |
|
|
String portOption = String::EMPTY; | String portOption = String::EMPTY; |
String logsDirectory = String::EMPTY; | String logsDirectory = String::EMPTY; |
Boolean useSLP = false; | Boolean useSLP = false; |
|
Boolean useSSL = false; |
Boolean daemonOption = false; | Boolean daemonOption = false; |
Boolean shutdownOption = false; | Boolean shutdownOption = false; |
Boolean forceOption = false; | Boolean forceOption = false; |
|
|
{ | { |
useSLP = true; | useSLP = true; |
} | } |
|
|
|
if (String::equal(configManager->getCurrentValue("SSL"), "true")) |
|
{ |
|
useSSL = true; |
|
} |
} | } |
catch (UnrecognizedConfigProperty e) | catch (UnrecognizedConfigProperty e) |
{ | { |
|
|
<< (pegasusIOTrace ? " Tracing to Display ": " ") | << (pegasusIOTrace ? " Tracing to Display ": " ") |
<< (pegasusIOLog ? " Tracing to Log ": " ") | << (pegasusIOLog ? " Tracing to Log ": " ") |
<< (useSLP ? " SLP reg. " : " No SLP ") | << (useSLP ? " SLP reg. " : " No SLP ") |
|
<< (useSSL ? " Use SSL " : " No SSL ") |
<< endl; | << endl; |
| |
// Put server start message to the logger | // Put server start message to the logger |
Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION, | Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION, |
"Start $0 $1 port $2 $3 $4", |
"Start $0 $1 port $2 $3 $4 $5", |
PEGASUS_NAME, | PEGASUS_NAME, |
PEGASUS_VERSION, | PEGASUS_VERSION, |
address, | address, |
(pegasusIOTrace ? " Tracing": " "), | (pegasusIOTrace ? " Tracing": " "), |
(useSLP ? " SLP on " : " SLP off ")); |
(useSLP ? " SLP on " : " SLP off "), |
|
(useSSL ? " Use SSL " : " No SSL ")); |
| |
// do we need to run as a daemon ? | // do we need to run as a daemon ? |
if (daemonOption) | if (daemonOption) |
|
|
#endif | #endif |
| |
Monitor monitor; | Monitor monitor; |
CIMServer server(&monitor, pegasusHome); |
CIMServer server(&monitor, pegasusHome, useSSL); |
| |
// bind throws an exception of the bind fails | // bind throws an exception of the bind fails |
cout << "Binding to " << address << endl; | cout << "Binding to " << address << endl; |