2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00

daemon-windows: Ability to handle windows service calls.

The following code does not add any users yet.

The visioned workflow that this piece of code should work with is:
* Create a windows service through a startup script with
a tool like 'sc'
ex:  sc create ovsdb-server binpath=
 "C:\openvswitch\usr\sbin\ovsdb-server.exe -vconsole:off
-vsyslog:off -vfile:info --remote=ptcp:6632:127.0.0.1 --log-file
--service-monitor --service"

* Start the service from the startup script.
ex: sc start ovsdb-server

* Terminate the service during shutdown process.
ex: sc stop ovsdb-server

* Abrupt termination will restart the service.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Gurucharan Shetty
2014-01-16 16:16:24 -08:00
parent 80e448834d
commit fda546bd0b
8 changed files with 417 additions and 5 deletions

View File

@@ -717,3 +717,22 @@ check_already_running(void)
pidfile, ovs_strerror(-pid));
}
}
/* stub functions for non-windows platform. */
void
service_start(int *argc OVS_UNUSED, char **argv[] OVS_UNUSED)
{
}
void
service_stop(void)
{
}
bool
should_service_stop(void)
{
return false;
}