From eed6d7a00496929a7279358f37aa9fc249fa4091 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Mon, 7 Aug 2023 19:18:52 +0200 Subject: [PATCH] Dodanie funkcji 'idle-exec-command' - skrypt 'idle.sh' --- idle.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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 $@; +} + -- 2.39.5