]> gitweb.morketsmerke.org Git - idle.git/commitdiff
Dodanie aktualizacji bazy danych po instalacji kontenerów w systemie - funkcja 'idle...
authorxf0r3m <jakubstasinski@protonmail.com>
Tue, 8 Aug 2023 06:00:29 +0000 (08:00 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Tue, 8 Aug 2023 06:00:29 +0000 (08:00 +0200)
idle.sh

diff --git a/idle.sh b/idle.sh
index d8bfed30f2227433908deb344c7599bad47b5ab7..675b930ced567983482c0b5b50b5bf0fdc4bb4c1 100644 (file)
--- a/idle.sh
+++ b/idle.sh
@@ -105,6 +105,11 @@ function idle-fetch-containers() {
     done 
   }
 
+  function update-database() {
+    source /usr/local/bin/database;
+    idle-db-update-containers-desc;
+  }
+
   if ! lxc profile show default | grep -q 'idle'; then
     echo -e "${RED}LXD isn't initialized. You must run 'idle-lxd-init' firs${ENDCOLOR}";
     exit 1;
@@ -126,7 +131,9 @@ function idle-fetch-containers() {
       else
         contName=$1;
         create-container $contName;
-      fi 
+      fi
+      echo "Updating database...";
+      update-database;
     else
       echo "idle-fetch-containers - fetch IDLE containers";
       echo "IDLE Project @ 2023 morketsmerke.org";