mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-16 22:28:17 +00:00
More Windows service work... it builds! Now to do a new installer and test. Also fix a Windows compile warning in Switch.cpp.
This commit is contained in:
4
main.cpp
4
main.cpp
@ -628,6 +628,7 @@ int main(int argc,char **argv)
|
||||
if (!winRunFromCommandLine) {
|
||||
ZeroTierOneService zt1Service;
|
||||
if (CServiceBase::Run(zt1Service) == TRUE) {
|
||||
// Normal termination of service process
|
||||
return 0;
|
||||
} else {
|
||||
fprintf(stderr,"%s: unable to start service (try -h for help)"ZT_EOL_S,argv[0]);
|
||||
@ -637,7 +638,6 @@ int main(int argc,char **argv)
|
||||
#endif
|
||||
{
|
||||
int exitCode = 0;
|
||||
|
||||
try {
|
||||
node = new Node(homeDir,port,controlPort);
|
||||
switch(node->run()) {
|
||||
@ -669,11 +669,9 @@ int main(int argc,char **argv)
|
||||
fprintf(stderr,"%s: unexpected exception!"ZT_EOL_S,argv[0]);
|
||||
exitCode = 3;
|
||||
}
|
||||
|
||||
#ifdef __UNIX_LIKE__
|
||||
Utils::rm((std::string(homeDir)+"/zerotier-one.pid").c_str());
|
||||
#endif
|
||||
|
||||
return exitCode;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user