mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
24 lines
616 B
Plaintext
24 lines
616 B
Plaintext
meta {
|
|
name: shellComand
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
patch {
|
|
url: 127.0.0.1:1323/api/shellCommand
|
|
body: json
|
|
auth: inherit
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"command": "find . -maxdepth 1 -mindepth 1 -print0 | xargs -0 -I{} bash -c 'typ=$(file -b --mime-type -- \"{}\"); size=$(stat -c \"%s\" -- \"{}\"); created=$(stat -c \"%w\" -- \"{}\"); [ \"$created\" = \"-\" ] && created=$(stat -c \"%y\" -- \"{}\"); jq -n --arg name \"{}\" --arg type \"$typ\" --arg size \"$size\" --arg created \"$created\" \"{name:\\$name, type:\\$type, size:\\$size, created:\\$created}\"'"
|
|
}
|
|
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|