For the latest stable version, please use Emilua API 0.10!

system.jail_get

Synopsis

local system = require "system"
system.jail_get(params: table, flags: string[]|nil) -> integer, { [string]: string }

Description

Retrieves jail parameters.

params specify — as a list of strings — which parameters are desired in the returned value.

params also specify — in the same format as used by system.jail_set() — which jail to read values from. Usually "jid" or "name" are used as filters. The special parameter "lastjid" can be used to retrieve a list of all jails.

flags may contain the following values:

  • "dying"

Example

Retrieve the hostname and path of jail "foo":

local jid, params = system.jail_get {
    "host.hostname",
    "path",
    ["name"] = "foo"
}

print(jid)
print(params["host.hostname"])
print(params.path)