From 5743fe054deb494dee97af97a6b7e7ce24709a03 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Tue, 18 Jul 2023 19:04:05 +0200 Subject: [PATCH] =?utf8?q?Aktywacja=20polece=C5=84=20tworz=C4=85cych=20kon?= =?utf8?q?tenery,=20tworzenie=20kontener=C3=B3w,=20funkcja=20'idle-fetch-c?= =?utf8?q?ontainers',=20skrypt=20'idle.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- idle.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/idle.sh b/idle.sh index a163278..a9402df 100644 --- a/idle.sh +++ b/idle.sh @@ -67,9 +67,12 @@ function idle-fetch-containers() { if grep -q $containerName $DATABASE; then containerImagePath=$(grep $containerName $DATABASE | cut -d ";" -f 1); startupScript=$(grep $containerName $DATABASE | cut -d ";" -f 4); - echo "lxc launch $containerImagePath $containerName"; - echo "lxc file push ${HOME}/idle/$startupScript ${containerName}/root/${startupScript}"; - echo "lxc exec $containerName /bin/bash /root/${startupScript}"; + #echo "lxc launch $containerImagePath $containerName"; + /usr/bin/lxc launch $containerImagePath $containerName; + #echo "lxc file push ${HOME}/idle/$startupScript ${containerName}/root/${startupScript}"; + /usr/bin/lxc file push ${HOME}/idle/$startupScript ${containerName}/root/${startupScript} + #echo "lxc exec $containerName /bin/bash /root/${startupScript}"; + /usr/bin/lxc exec $containerName /bin/bash /root/${startupScript} echo "Container is ready for work."; else echo "Given container name doesn't exist in project database"; -- 2.39.5