From 0d7cbbc5d9e04630e713685f74ca32e0aaffef9a Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Mon, 7 Aug 2023 19:14:50 +0200 Subject: [PATCH] Dodanie funkcji idle-exec-shell - skrypt idle.sh --- idle.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/idle.sh b/idle.sh index 809ae3b..c336283 100644 --- a/idle.sh +++ b/idle.sh @@ -150,3 +150,9 @@ function idle-fetch-containers() { fi fi } + +function idle-exec-shell() { + containerName=$1; + defaultContainerUser=$(grep ";${containerName};" $DATABASE | cut -d ";" -f 5); + lxc exec $containerName -- sudo --login --user $defaultContainerUser; +} -- 2.39.5