added `runtipictl shell`
This commit is contained in:
parent
6031300cc6
commit
4ed726b9b1
|
@ -6,6 +6,12 @@ jlmkr () {
|
||||||
|
|
||||||
JAIL_UID=${JAIL_UID:-${UID}}
|
JAIL_UID=${JAIL_UID:-${UID}}
|
||||||
|
|
||||||
|
jlmkr-shell() {
|
||||||
|
if jlmkr exec runtipi true; then
|
||||||
|
jlmkr shell --uid "${JAIL_UID}" runtipi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
jlmkr-exec () {
|
jlmkr-exec () {
|
||||||
local set_x=" set -x; pwd; id; "
|
local set_x=" set -x; pwd; id; "
|
||||||
[ -z "$QUIET" ] || set_x=""
|
[ -z "$QUIET" ] || set_x=""
|
||||||
|
@ -83,6 +89,9 @@ case "${1}" in
|
||||||
_ERROR_MSG="ERROR: failed to invoke a command inside the runtipi jail and can't start the jail." \
|
_ERROR_MSG="ERROR: failed to invoke a command inside the runtipi jail and can't start the jail." \
|
||||||
runtipi-cli start --env-file user-config/.env.local --no-permissions
|
runtipi-cli start --env-file user-config/.env.local --no-permissions
|
||||||
;;
|
;;
|
||||||
|
shell)
|
||||||
|
jlmkr-shell
|
||||||
|
;;
|
||||||
exec)
|
exec)
|
||||||
jlmkr-exec "${@:2}"
|
jlmkr-exec "${@:2}"
|
||||||
;;
|
;;
|
||||||
|
@ -124,6 +133,7 @@ case "${1}" in
|
||||||
"" "" "" \
|
"" "" "" \
|
||||||
"misc." "" ""\
|
"misc." "" ""\
|
||||||
"" "exec" "execute within the shell, START_DIR env applies" \
|
"" "exec" "execute within the shell, START_DIR env applies" \
|
||||||
|
"" "shell" "enter an insteractive shell" \
|
||||||
"" "" "" \
|
"" "" "" \
|
||||||
"" "setup" "setup runtipictl in user's .local/bin dir"
|
"" "setup" "setup runtipictl in user's .local/bin dir"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue