Should be as simple as running this command as is within some Terminal add-on:
curl -fsSL -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" http://supervisor/os/config/swap -d '{"swap_size": "0"}'
Should be as simple as running this command as is within some Terminal add-on:
curl -fsSL -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" http://supervisor/os/config/swap -d '{"swap_size": "0"}'
#!/bin/bash | |
set -euxo pipefail | |
version="${1:-latest}" | |
case $(uname -m) in | |
x86_64) arch="amd64" ;; | |
aarch64) arch="arm64" ;; | |
*) |
local json = require("json") | |
-- request body is in r.RequestBody, use it as any other string: | |
local body, err = json.decode(r.RequestBody) | |
if err then error(err) end | |
local new_body = { | |
event_type = "gerrit-" .. body["type"], | |
client_payload = body | |
} |