wdx daemon
Start, stop and inspect the daemon.
The daemon serves the project commands on /home/you/.wdx/wdx.sock. It reads the settings when it starts; restart it after changing them or updating wdx.
| Command | What it does |
|---|---|
wdx daemon restart |
Restart the daemon, or start it |
wdx daemon start |
Start the daemon |
wdx daemon status |
Show whether the daemon is running |
wdx daemon stop |
Stop the daemon |
wdx daemon restart
Section titled “wdx daemon restart”Restart the daemon, or start it.
wdx daemon restart [flags]Stop the daemon if it is running, then start it, as after updating wdx or its settings.
Examples
Section titled “Examples”# Restart the daemon after changing the settingswdx daemon restartOutput
Section titled “Output”The daemon started. With --json: {“result”: “restarted”, “daemon”: {…}}
With --json, result is one of: restarted.
Errors
Section titled “Errors”| Code | Exit | When |
|---|---|---|
daemon_unavailable |
3 | the daemon is not running or not answering |
usage |
2 | the request, command line or a setting is invalid |
internal |
3 | an unexpected failure: database, filesystem or git |
wdx daemon start
Section titled “wdx daemon start”Start the daemon.
wdx daemon start [--foreground] [flags]Waits until the daemon answers. It starts through systemd or launchd when the installer set it up as a service, else in the background. With --foreground it runs in this process until interrupted, as a service manager runs it.
| Flag | Default | Description |
|---|---|---|
--foreground |
run in this process until interrupted |
Examples
Section titled “Examples”# Start the daemonwdx daemon start
# Run it in this terminal until Ctrl-Cwdx daemon start --foregroundOutput
Section titled “Output”The daemon, already running or started; with --foreground, the daemon once stopped. With --json: {“result”: …, “daemon”: {…}}
With --json, result is one of: running, started or stopped.
Errors
Section titled “Errors”| Code | Exit | When |
|---|---|---|
already_running |
1 | a daemon already serves this home |
daemon_unavailable |
3 | the daemon is not running or not answering |
usage |
2 | the request, command line or a setting is invalid |
internal |
3 | an unexpected failure: database, filesystem or git |
wdx daemon status
Section titled “wdx daemon status”Show whether the daemon is running.
wdx daemon status [flags]Show whether the daemon is running
Examples
Section titled “Examples”# Show whether the daemon is runningwdx daemon status
# As JSONwdx daemon status --jsonOutput
Section titled “Output”Whether the daemon is running, its pid, what it says about itself when it answers, and the service manager that runs it, if it is installed as a service. With --json: {“running”: …, “pid”: …, “daemon”: {…}, “manager”: …}
Errors
Section titled “Errors”| Code | Exit | When |
|---|---|---|
usage |
2 | the request, command line or a setting is invalid |
internal |
3 | an unexpected failure: database, filesystem or git |
wdx daemon stop
Section titled “wdx daemon stop”Stop the daemon.
wdx daemon stop [flags]The requests in flight finish first. It stops through systemd or launchd when it runs as a service, else by signalling it.
Examples
Section titled “Examples”# Stop the daemonwdx daemon stopOutput
Section titled “Output”The daemon stopped, or that none was running. With --json: {“result”: …, “daemon”: {…}}
With --json, result is one of: not_running or stopped.
Errors
Section titled “Errors”| Code | Exit | When |
|---|---|---|
usage |
2 | the request, command line or a setting is invalid |
internal |
3 | an unexpected failure: database, filesystem or git |