sh.zio.pod-exec: add script
parent
6e25c52f48
commit
406f791c89
|
@ -44,6 +44,7 @@
|
|||
!/usr/local/bin/
|
||||
/usr/local/bin/*
|
||||
!/usr/local/bin/sh.zio.backup
|
||||
!/usr/local/bin/sh.zio.pod-exec
|
||||
!/usr/local/bin/zio-backup
|
||||
!/usr/local/bin/zio-libvirt-port-forward
|
||||
!/usr/local/bin/zio-update-caddy
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ "$(realpath "$(dirname "$(realpath -s "$0")")/../../../")" == "/" ]]; then
|
||||
. /usr/local/libexec/zio/helpers/bash.sh
|
||||
else
|
||||
. "$(dirname "$(realpath -s "$0")")/../libexec/zio/helpers/bash.sh"
|
||||
fi
|
||||
|
||||
podman_exec $1 "${@:2}"
|
|
@ -34,7 +34,7 @@ function get_real_path() {
|
|||
function podman_exec() {
|
||||
container="$1"
|
||||
command="${@:2}"
|
||||
shell="/bin/sh"
|
||||
shell="/bin/sh" # TODO: Programatically get this
|
||||
podman exec -it $container $shell -c "$command"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue