From: xf0r3m Date: Mon, 7 Aug 2023 17:18:52 +0000 (+0200) Subject: Dodanie funkcji 'idle-exec-command' - skrypt 'idle.sh' X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=eed6d7a00496929a7279358f37aa9fc249fa4091;p=idle.git Dodanie funkcji 'idle-exec-command' - skrypt 'idle.sh' --- diff --git a/idle.sh b/idle.sh index c336283..d8bfed3 100644 --- a/idle.sh +++ b/idle.sh @@ -156,3 +156,11 @@ function idle-exec-shell() { defaultContainerUser=$(grep ";${containerName};" $DATABASE | cut -d ";" -f 5); lxc exec $containerName -- sudo --login --user $defaultContainerUser; } + +function idle-exec-command() { + containerName=$1; + shift; + defaultContainerUser=$(grep ";${containerName};" $DATABASE | cut -d ";" -f 5); + lxc exec $containerName -- sudo --login --user $defaultContainerUser $@; +} +