]> gitweb.morketsmerke.org Git - idle.git/commitdiff
Aktywacja poleceń tworzących kontenery, tworzenie kontenerów, funkcja 'idle-fetch...
authorxf0r3m <jakubstasinski@protonmail.com>
Tue, 18 Jul 2023 17:04:05 +0000 (19:04 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Tue, 18 Jul 2023 17:04:05 +0000 (19:04 +0200)
idle.sh

diff --git a/idle.sh b/idle.sh
index a1632781143561d2285f9052ba352667965ccc56..a9402df5a8b6dcdef0588ee071fa86ee2c971a6b 100644 (file)
--- 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";