package sys import ( "github.com/versenilvis/iris/spec" ) func init() { spec.Register(&spec.Spec{ Name: "launchctl", Description: "Service or domain target", Subcommands: []spec.Subcommand{ {Name: "bootstrap", Description: "Bootstraps a domain or a service into a domain"}, {Name: "bootout", Description: "Tears down a domain or removes a service from a domain"}, {Name: "enable", Description: "Enables an existing service"}, {Name: "disable", Description: "Disables an existing service"}, {Name: "kickstart", Description: "Forces an existing service to start"}, {Name: "attach", Description: "Attach the system's debugger to a service"}, {Name: "debug", Description: "Configures the next invocation of a service for debugging"}, {Name: "argv", Description: "Variable args: argv0 argv1"}, {Name: "kill", Description: "Sends a signal to the service instance"}, {Name: "signal", Description: "Specify signal-name or signal-number"}, {Name: "blame", Description: "Prints the reason a service is running"}, {Name: "print", Description: "Prints a description of a domain or service"}, {Name: "print-cache", Description: "Prints information about the service cache"}, {Name: "print-disabled", Description: "Prints which services are disabled"}, {Name: "plist", Description: "Prints a property list embedded in a binary (targets the Info.plist by default)"}, {Name: "segment", Description: "Segment or section"}, {Name: "procinfo", Description: "Prints port information about a process"}, {Name: "hostinfo", Description: "Prints port information about the host"}, {Name: "resolveport", Description: "Resolves a port name from a process to an endpoint in launchd"}, {Name: "limit", Description: "Reads or modifies launchd's resource limits"}, {Name: "runstats", Description: "Prints performance statistics for a service"}, {Name: "examine", Description: "Runs the specified analysis tool against launchd in a non-re-entrant manner"}, {Name: "config", Description: "Modifies persistent configuration parameters for launchd domains"}, {Name: "param", Description: "A key for a key/value pair"}, {Name: "value", Description: "A value for a key/value pair"}, {Name: "dumpstate", Description: "Dumps launchd state to stdout"}, {Name: "dumpjpcategory", Description: "Dumps the jetsam properties category for all services"}, {Name: "reboot", Description: "Initiates a system reboot of the specified type"}, {Name: "remove", Description: "Unloads the specified service name"}, {Name: "list", Description: "Lists information about services"}, {Name: "start", Description: "Starts the specified service"}, {Name: "stop", Description: "Stops the specified service if it is running"}, {Name: "setenv", Description: "Sets the specified environment variables for all services within the domain"}, {Name: "unsetenv", Description: "Unsets the specified environment variables for all services within the domain"}, {Name: "getenv", Description: "Gets the value of an environment variable from within launchd"}, {Name: "bsexec", Description: "Execute a program in another process' bootstrap context"}, {Name: "asuser", Description: "Execute a program in the bootstrap context of a given user"}, {Name: "submit", Description: "Submit a basic job from the command line"}, {Name: "label", Description: "Unique label to assign to launchd"}, {Name: "command", Description: "Command to run"}, {Name: "managerpid", Description: "Prints the PID of the launchd controlling the session"}, {Name: "manageruid", Description: "Prints the UID of the current launchd session"}, {Name: "managername", Description: "Prints the name of the current launchd session"}, {Name: "error", Description: "Prints a description of an error"}, {Name: "type", Description: "Error domain type"}, {Name: "code", Description: "Numeric code"}, {Name: "variant", Description: "Prints the launchd variant"}, {Name: "version", Description: "Prints the launchd version"}, {Name: "help", Description: "Prints the usage for a given subcommand"}, }, Options: []spec.Option{ {Name: "-w", Description: "Enable if disabled"}, {Name: "-F", Description: "Force load"}, {Name: "-S", Description: "Session"}, {Name: "-D", Description: "Load files from specified domain"}, {Name: "-k", Description: "Kill instance before restarting"}, {Name: "-p", Description: "Print PID"}, {Name: "-s", Description: "Force the service to start"}, {Name: "-x", Description: "Attach xpcproxy"}, {Name: "--program", Description: "Use program path as executable"}, {Name: "--guard-malloc", Description: "Turn on libgmalloc"}, {Name: "--malloc-stack-logging", Description: "Turn on malloc(3) stack logging"}, {Name: "--malloc-nano-allocator", Description: "Turn on malloc(3) nano allocator"}, {Name: "--debug-libraries", Description: "Set the DYLD_IMAGE_SUFFIX"}, {Name: "--introspection-libraries", Description: "Add introspection libraries to the DYLD_IMAGE_PATH"}, {Name: "--NSZombie", Description: "Enables NSZombie"}, {Name: "--32", Description: "Runs service on appropriate 32-bit architecture"}, {Name: "--stdin", Description: "Sets the stdin path"}, {Name: "--stdout", Description: "Sets the stdout path"}, {Name: "--stderr", Description: "Sets the stderr path"}, {Name: "--environment", Description: "Sets environment variables"}, {Name: "-o", Description: "Std out path"}, {Name: "-e", Description: "Std err path"}, {Name: "-l", Description: "Label flag"}, }, }) }