(install_service): Use the compiled in default for location of econfig
when the -e is not specified while creating a service.
This commit is contained in:
parent
a16b3266ff
commit
613a9c52db
1 changed files with 3 additions and 5 deletions
|
@ -44,11 +44,9 @@ install_service(char *program_name, char *service_name, char *config_file)
|
||||||
HANDLE schSCManager,schService;
|
HANDLE schSCManager,schService;
|
||||||
SERVICE_DESCRIPTION sdBuf;
|
SERVICE_DESCRIPTION sdBuf;
|
||||||
|
|
||||||
if (config_file == NULL)
|
if (config_file != NULL)
|
||||||
config_file = _fullpath(NULL, "econfig", 0);
|
_snprintf(&program_name[strlen(program_name)], _MAX_PATH-strlen(program_name), " -e %s",
|
||||||
|
config_file);
|
||||||
_snprintf(&program_name[strlen(program_name)], _MAX_PATH-strlen(program_name), " -e %s",
|
|
||||||
config_file);
|
|
||||||
|
|
||||||
if (service_name == NULL)
|
if (service_name == NULL)
|
||||||
service_name = DEFAULT_SERVICE_NAME;
|
service_name = DEFAULT_SERVICE_NAME;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue