cmd/ctrld: add commands to control ctrld as a system service

Supported actions:

 - start: install and start ctrld as a system service
 - stop: stop the ctrld service
 - restart: restart ctrld service
 - status: show status of ctrld service
 - uninstall: remove ctrld from system service
This commit is contained in:
Cuong Manh Le
2022-12-23 21:35:26 +07:00
committed by Cuong Manh Le
parent 9e7578fb29
commit ec72af1916
8 changed files with 315 additions and 39 deletions

View File

@@ -25,7 +25,10 @@ The user can choose to override default value using command line `--config` or `
ctrld run --config /path/to/myconfig.toml
```
If no configuration files found, a default `config.toml` file will be created in the current directory.
If no configuration files found, a default `ctrld.toml` file will be created in the current directory.
In pre v1.1.0, `config.toml` file was used, so for compatibility, `ctrld` will still read `config.toml`
if it's existed.
# Example Config