2
0
Fork 0

sh.zio.pod-exec: add script

main
Ducky 2023-08-15 15:50:59 +01:00
parent 6e25c52f48
commit 406f791c89
3 changed files with 11 additions and 1 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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}"

View File

@ -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"
}