-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed server logging not being passed to service. - Fixed working directory setup for service mode.
- Loading branch information
1 parent
1966399
commit 8c2a0b9
Showing
7 changed files
with
75 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.IO; | ||
|
||
namespace MinecraftBedrockService | ||
{ | ||
internal class ServiceConfig | ||
{ | ||
public string WorkingDirectory { get; set; } = Directory.GetCurrentDirectory(); | ||
public string Executable { get; set; } = "bedrock_server.exe"; | ||
public string LogFileName { get; set; } = "bedrock_service.log"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Minecraft Bedrock Windows Service Wrapper | ||
|
||
This project allows the `bedrock_server.exe` file to run safely as a background service on Windows systems. | ||
|
||
## Features | ||
|
||
- Safe handling of Shutdown and Stop conditions by telling server to safely exit with the `stop` command. | ||
- Automatically call `whitelist reload` when `whitelist.json` is modified. | ||
- Automatically call `permission reload` when `permissions.json` is modified. | ||
- Server output is saved to disk as `bedrock_service.log`. | ||
- `bedrock_service.exe` can also be run as a console application for troubleshooting purposes. | ||
|
||
## Usage | ||
|
||
1. Place `bedrock_service.exe` in a directory (doesn't need to be the same place as `bedrock_server.exe`). | ||
2. Start `bedrock_service.exe` for testing. | ||
If `bedrock_service.exe` is not in the same directory as `bedrock_server.exe` pass the `--workingDirectory "directory\containing\bedrock_server"` parameter. | ||
3. Exit test mode with `CTRL + X`. | ||
3. Create a new Windows Service entry: | ||
|
||
`.\sc.exe create MinecraftBedrockServer binPath= "path\to\bedrock_service.exe --workingDirectory \"directory\containing\bedrock_server\"" start= delayed-auto DispayName= "Minecraft Bedrock Dedicated Server" ` | ||
|
||
## Parameters | ||
|
||
| Parameter | Default Value | Description | | ||
|----------------------|-----------------------|------------------------------------| | ||
| `--workingDirectory` | Current Directory | Directory of server code and logs. | | ||
| `--executable` | `bedrock_server.exe` | Filename of server program. | | ||
| `--logFileName` | `bedrock_service.log` | Filename of log output. | |