2024-09-19 04:31:48 +00:00
|
|
|
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
|
|
|
|
|
|
|
|
if is_cmd midclt; then
|
|
|
|
if [ -n "$SCALE_POOL_ROOT" ]; then
|
|
|
|
if [ -e "$SCALE_POOL_ROOT/jailmaker/jlmkr.py" ]; then
|
|
|
|
#alias jlmkr="bash -c '_jlmkr() { $SCALE_POOL_ROOT/jailmaker/jlmkr.py \${@:---help}; }; _jlmkr \$@' "
|
2024-09-19 14:35:09 +00:00
|
|
|
function jlmkr() { sudo $SCALE_POOL_ROOT/jailmaker/jlmkr.py "${@:---help}"; }
|
2024-11-25 02:54:37 +00:00
|
|
|
|
|
|
|
jlmkr-zellij() {
|
|
|
|
zellij action go-to-tab-name --create "jailmkr"
|
|
|
|
zellij action new-pane --name "${1:?must pass jail name}@jlmkr" -- sh -ci "reset; sudo $SCALE_POOL_ROOT/jailmaker/jlmkr.py shell --uid ${UID} ${1}"
|
|
|
|
zellij action focus-previous-pane
|
|
|
|
zellij action close-pane
|
|
|
|
}
|
|
|
|
|
2024-09-19 04:31:48 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|