Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
# Svctl

## States

```mermaid
stateDiagram-v2
[*] --> Stopped
Stopped --> [*]
Stopped --> Running: Start
Running --> Stopped: Stop
Running --> Restarting: Restart
Restarting --> Running
Restarting --> Errored
Errored --> Stopped: Reset
Svctl operates as (Daemon)[#Daemon] which acts as process watcher and (CLI)[#CLI] which is an interface to communicate with Daemon.

## Daemon
Daemon keeps track of all started PRBF2 processes, stops them on user input and restarts if they exit on their own.

Daemon has to be running so other commands can interact with PRBF2 server instance.

### Windows
On Windows when a process crashes and raises an error, this error has to be closed manually,
Daemon is running an Error Killer which closes the process in such cases (and triggers restart mechanism).

### Linux
`/proc/sys/kernel/core_pattern`
```
"core.%e.%p" > /proc/sys/kernel/core_pattern
```

## Init

```bash
$ svctl init
```

## Register

```bash
$ svctl register
```