- I wrote a scripts to copy and generate all commands missing in iris from fig repo: https://github.com/withfig/autocomplete - Add a new script to generate commands docs about which commands currently are inside commands folder 377d4aac663590e504fe39a92eb4dac4cbd333b2 - Add more icons e64d4e70a1db61e62053460a882e093bd6373ab1
107 lines
7.3 KiB
Go
107 lines
7.3 KiB
Go
package sys
|
|
|
|
import (
|
|
"github.com/versenilvis/iris/commands/core"
|
|
)
|
|
|
|
func init() {
|
|
core.Register(&core.Spec{
|
|
Name: "systemctl",
|
|
Description: "Control the systemd system and service manager",
|
|
Subcommands: []core.Subcommand{
|
|
{Name: "list-units", Description: "List units currently in memory"},
|
|
{Name: "list-sockets", Description: "List socket units currently in memory ordered by address"},
|
|
{Name: "list-timers", Description: "List timer units currently in memory ordered by next elapse"},
|
|
{Name: "is-active", Description: "Check whether units are active"},
|
|
{Name: "is-failed", Description: "Check whether units are failed"},
|
|
{Name: "status", Description: "Show runtime status of one or more units"},
|
|
{Name: "show", Description: "Show properties of one or more"},
|
|
{Name: "cat", Description: "Show files and drop-ins of specified units"},
|
|
{Name: "help", Description: "Show manual for one or more units"},
|
|
{Name: "start", Description: "Start (activate) one or more units"},
|
|
{Name: "stop", Description: "Stop (deactivate) one or more units"},
|
|
{Name: "reload", Description: "Reload one or more units"},
|
|
{Name: "restart", Description: "Start or restart one or more units"},
|
|
{Name: "try-restart", Description: "Restart one or more units if active"},
|
|
{Name: "reload-or-restart", Description: "Reload one or more units if possible, otherwise start or restart"},
|
|
{Name: "try-reload-or-restart", Description: "If active, reload one or more units, if supported, otherwise restart"},
|
|
{Name: "isolate", Description: "Start one unit and stop all others"},
|
|
{Name: "kill", Description: "Send signal to processes of a unit"},
|
|
{Name: "clean", Description: "Clean runtime, cache, state, logs or configuration of unit"},
|
|
{Name: "freeze", Description: "Freeze execution of unit processes"},
|
|
{Name: "thaw", Description: "Resume execution of a frozen unit"},
|
|
{Name: "set-property", Description: "Sets one or more properties of a unit"},
|
|
{Name: "bind", Description: "Bind-mount a path from the host into a unit's namespace"},
|
|
{Name: "mount-image", Description: "Mount an image from the host into a unit's namespace"},
|
|
{Name: "service-log-level", Description: "Get/set logging threshold for service"},
|
|
{Name: "service-log-target", Description: "Get/set logging target for service"},
|
|
{Name: "reset-failed", Description: "Reset failed state for all, one, or more units"},
|
|
{Name: "list-unit-files", Description: "List installed unit files"},
|
|
{Name: "enable", Description: "Enable one or more unit files"},
|
|
{Name: "disable", Description: "Disable one or more unit files"},
|
|
{Name: "reenable", Description: "Reenable one or more unit files"},
|
|
{Name: "preset", Description: "Enable/disable one or more unit files based on preset configuration"},
|
|
{Name: "preset-all", Description: "Enable/disable all unit files based on preset configuration"},
|
|
{Name: "mask", Description: "Mask one or more unit files"},
|
|
{Name: "unmask", Description: "Unmask one or more unit files"},
|
|
{Name: "link", Description: "Link one or more units files into the search path"},
|
|
{Name: "revert", Description: "Revert one or more unit files to vendor version"},
|
|
{Name: "add-wants", Description: "Add 'Wants' dependency for the target on specified one or more units"},
|
|
{Name: "add-requires", Description: "Add 'Requires' dependency for the target on specified one or more units"},
|
|
{Name: "edit", Description: "Edit one or more unit files"},
|
|
{Name: "get-default", Description: "Get the name of the default target"},
|
|
{Name: "set-default", Description: "Set the default target"},
|
|
{Name: "list-jobs", Description: "List jobs"},
|
|
{Name: "cancel", Description: "Cancel all, one, or more jobs"},
|
|
{Name: "show-environment", Description: "Dump environment"},
|
|
{Name: "set-environment", Description: "Set one or more environment variables"},
|
|
{Name: "unset-environment", Description: "Unset one or more environment variables"},
|
|
{Name: "import-environment", Description: "Import all or some environment variables"},
|
|
{Name: "daemon-reload", Description: "Reload systemd manager configuration"},
|
|
{Name: "daemon-reexec", Description: "Reexecute systemd manager"},
|
|
},
|
|
Options: []core.Option{
|
|
{Name: "-h", Description: "Show this help"},
|
|
{Name: "--version", Description: "Show package version"},
|
|
{Name: "--system", Description: "Connect to system manager"},
|
|
{Name: "--user", Description: "Connect to user service manager"},
|
|
{Name: "-H", Description: "Operate on remote host"},
|
|
{Name: "-M", Description: "Operate on a local container"},
|
|
{Name: "-t", Description: "List units of a particular type"},
|
|
{Name: "--state", Description: "List units with particular LOAD or SUB or ACTIVE state"},
|
|
{Name: "--failed", Description: "Shortcut for --state=failed"},
|
|
{Name: "-p", Description: "Show only properties by this name"},
|
|
{Name: "-P", Description: "Equivalent to --value --property=NAME"},
|
|
{Name: "-a", Description: "Don't ellipsize unit names on output"},
|
|
{Name: "-r", Description: "Show unit list of host and local containers"},
|
|
{Name: "--reverse", Description: "Show reverse dependencies with 'list-dependencies'"},
|
|
{Name: "--with-dependencies", Description: "Show unit dependencies with 'status', 'cat', 'list-units', and 'list-unit-files'"},
|
|
{Name: "--job-mode", Description: "Specify how to deal with already queued jobs, when queueing a new job"},
|
|
{Name: "-T", Description: "When enqueuing a unit job, show full transaction"},
|
|
{Name: "--show-types", Description: "When showing sockets, explicitly show their type"},
|
|
{Name: "--value", Description: "When showing properties, only print the value"},
|
|
{Name: "--check-inhibitors", Description: "Specify if checking inhibitors before shutting down sleeping or hibernating"},
|
|
{Name: "-i", Description: "Shortcut for --check-inhibitors=no"},
|
|
{Name: "--kill-who", Description: "Whom to send signal to"},
|
|
{Name: "-s", Description: "Which signal to send"},
|
|
{Name: "--what", Description: "Which types of resources to remove"},
|
|
{Name: "--now", Description: "Start or stop unit after enabling or disabling it"},
|
|
{Name: "--dry-run", Description: "Only print what would be done"},
|
|
{Name: "-q", Description: "Suppress output"},
|
|
{Name: "--wait", Description: "Do not wait until operation finished"},
|
|
{Name: "--no-wall", Description: "Don't send wall message before halt/power-off/reboot"},
|
|
{Name: "--no-reload", Description: "Don't reload daemon after en-/dis-abling unit files"},
|
|
{Name: "--legend", Description: "Enable/disable the legend (column headers and hints)"},
|
|
{Name: "--no-pager", Description: "Do not pipe output into a pager"},
|
|
{Name: "--no-ask-password", Description: "Do not ask for system passwords"},
|
|
{Name: "--global", Description: "Edit/enable/disable/mask default user unit files globally"},
|
|
{Name: "--runtime", Description: "Edit/enable/disable/mask unit files temporarily until next reboot"},
|
|
{Name: "-f", Description: "Apply only enable, only disable, or all presets"},
|
|
{Name: "--root", Description: "Edit/enable/disable/mask unit files in the specified root directory"},
|
|
{Name: "-n", Description: "Number of journal entries to show"},
|
|
{Name: "-o", Description: "Change journal output mode"},
|
|
{Name: "--firmware-setup", Description: "Tell the firmware to show the setup menu on next boot"},
|
|
},
|
|
})
|
|
}
|