mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-04 19:23:13 +02:00
Fix service on Windows not working in UnrealIRCd 5 now that we
have the bin\ directory.
This commit is contained in:
@@ -97,11 +97,6 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv)
|
||||
|
||||
IsService = TRUE;
|
||||
|
||||
/* Go one level up, since we are currently in the bin\ subdir
|
||||
* and we want to be in (f.e.) "C:\Program Files\UnrealIRCd 5"
|
||||
*/
|
||||
chdir("..");
|
||||
|
||||
/* Initialize the service structure */
|
||||
IRCDStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
|
||||
IRCDStatus.dwCurrentState = SERVICE_START_PENDING;
|
||||
@@ -116,6 +111,11 @@ VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR *lpszArgv)
|
||||
*folder = 0;
|
||||
chdir(path);
|
||||
|
||||
/* Go one level up, since we are currently in the bin\ subdir
|
||||
* and we want to be in (f.e.) "C:\Program Files\UnrealIRCd 5"
|
||||
*/
|
||||
chdir("..");
|
||||
|
||||
/* Register the service controller */
|
||||
IRCDStatusHandle = RegisterServiceCtrlHandler("UnrealIRCd", IRCDCtrlHandler);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user