From cf76f419abf61993aec1dee13db9dbd1f34e627e Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 8 Jan 2024 01:56:44 +0300 Subject: [PATCH] testing... Signed-off-by: Alex A. Naanou --- .pct-helpers | 21 +++++++++++++++++++++ nextcloud/make.sh | 15 ++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.pct-helpers b/.pct-helpers index 2d5a61a..43e6ec5 100644 --- a/.pct-helpers +++ b/.pct-helpers @@ -204,6 +204,27 @@ xreadpass(){ return 1 } + +# +# tklWaitForSetup MSG +# +tklWaitForSetup(){ + printf "$1" + while ! $(lxc-attach $ID -- test -e /etc/inithooks.conf) ; do + printf '.' + sleep 5 + done + printf '+' + sleep 5 + while ! [[ $(lxc-attach $ID -- cat /etc/inithooks.conf | wc -c) < 2 ]] ; do + printf '.' + sleep 5 + done + printf 'ready.\n' + sleep 5 +} + + # # readConfig # diff --git a/nextcloud/make.sh b/nextcloud/make.sh index 3ec663e..a22bb47 100755 --- a/nextcloud/make.sh +++ b/nextcloud/make.sh @@ -91,21 +91,10 @@ sleep ${TIMEOUT:=5} # for tkl inithooks doc see: # https://www.turnkeylinux.org/docs/inithooks -printf "# TKL setup, this may take a while" -while ! $(lxc-attach $ID -- test -e /etc/inithooks.conf) ; do - printf '.' - sleep 5 -done -printf '+' -while ! [[ $(lxc-attach $ID -- cat /etc/inithooks.conf | wc -c) < 2 ]] ; do - printf '.' - sleep 5 -done -printf 'ready.\n' -sleep 5 +tklWaitForSetup "# TKL setup, this may take a while" echo "# Starting TKL UI..." -@ lxc-attach $ID -- bash --login -c 'exit' +#@ lxc-attach $ID -- bash --login -c 'exit' exit