mirror of
https://github.com/YunoHost-Apps/garage_ynh.git
synced 2024-09-03 18:36:32 +02:00
install: simplify node id loop, add stuff to be able to debug
This commit is contained in:
parent
6388d37dc9
commit
a6c4796499
1 changed files with 3 additions and 5 deletions
|
@ -115,14 +115,12 @@ garage_command="$install_dir/garage -c $install_dir/garage.toml"
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
# sometimes server need some time to start
|
# sometimes server need some time to start
|
||||||
until [ "" != "$($garage_command node id -q 2>/dev/null | cut -d '@' -f1)" ] ; do
|
while [ -z "$($garage_command node id -q 2>/dev/null | cut -d '@' -f1)" ]; do
|
||||||
i=$(( i + 1 ))
|
i=$(( i + 1 ))
|
||||||
if [ $i -gt 30 ]
|
[ $i -le 30 ] || { $garage_command node id || true; ynh_die --message="unable to get node id"; }
|
||||||
then
|
|
||||||
ynh_die --message="unable to get node id"
|
|
||||||
fi
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1)
|
node_id=$($garage_command node id -q 2>/dev/null | cut -d '@' -f1)
|
||||||
ynh_app_setting_set --app=$app --key=node_id --value=$node_id
|
ynh_app_setting_set --app=$app --key=node_id --value=$node_id
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue