-
-
Notifications
You must be signed in to change notification settings - Fork 41
02 1. Control config
Naoki Kosaka edited this page Mar 2, 2023
·
2 revisions
config command has relay configurations and import/export their via JSON file.
$ relay control config
Enable/disable relay customize and import/export relay database.
Usage:
control config [command]
Available Commands:
disable Disable relay configuration
enable Enable relay configuration
export Export all relay information
import Import all relay information
list List all relay configuration
Flags:
-h, --help help for config
Global Flags:
-c, --config string Path of config (default "config.yml")
-v, --verbose Show debug log
Use " control config [command] --help" for more information about a command.
Specify the option you want to enable configuration in the argument.
$ relay control config enable
Enable relay configuration.
- person-only
Blocking feature for service-type actor.
- manually-accept
Enable manually accept follow request.
Usage:
control config enable [flags]
Flags:
-h, --help help for enable
Global Flags:
-c, --config string Path of config (default "config.yml")
-v, --verbose Show debug log
-
Enable
person-only
mode.$ relay control config enable person-only
Specify the option you want to disable configuration in the argument.
$ relay control config disable
Disable relay configuration.
- person-only
Blocking feature for service-type actor.
- manually-accept
Enable manually accept follow request.
Usage:
control config disable [flags]
Flags:
-h, --help help for disable
Global Flags:
-c, --config string Path of config (default "config.yml")
-v, --verbose Show debug log
-
Disable
person-only
mode.$ relay control config disable person-only
Export all relay database for backup or migration for move other. There are dumped into stdout.
$ relay control config export
Export all relay information by JSON format.
Usage:
control config export [flags]
Flags:
-h, --help help for export
Global Flags:
-c, --config string Path of config (default "config.yml")
-v, --verbose Show debug log
Import all relay database from JSON String. (made by export command)
$ relay control config import
Import all relay information from JSON.
Usage:
control config import [flags]
Flags:
--data string JSON String
-h, --help help for import
Global Flags:
-c, --config string Path of config (default "config.yml")
-v, --verbose Show debug log
-
Import from JSON String.
$ relay control config import --json '{"relayConfig":{"blockService":true,"manuallyAccept":true},"limitedDomains":["limitedDomain.example.jp"],"blockedDomains":["blockedDomain.example.jp"],"subscriptions":[{"domain":"subscription.example.jp","inbox_url":"https://subscription.example.jp/inbox","activity_id":"https://subscription.example.jp/UUID","actor_id":"https://subscription.example.jp/users/example"}]}'