From: xf0r3m Date: Tue, 8 Aug 2023 06:00:29 +0000 (+0200) Subject: Dodanie aktualizacji bazy danych po instalacji kontenerów w systemie - funkcja 'idle... X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=3207c4747d96d885a943a432aa6cb840a2eebdad;p=idle.git Dodanie aktualizacji bazy danych po instalacji kontenerów w systemie - funkcja 'idle-fetch-containers', nowa podfunkcja 'update-database', główny skrypt funkcji - idle.sh --- diff --git a/idle.sh b/idle.sh index d8bfed3..675b930 100644 --- 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";