mirror of
https://github.com/YunoHost-Apps/gitlab_ynh.git
synced 2024-09-03 18:36:35 +02:00
Fix waiting_to_start helper function
This commit is contained in:
parent
a019b8d0ca
commit
db5512d6ac
1 changed files with 3 additions and 6 deletions
|
@ -152,19 +152,16 @@ waiting_to_start() {
|
||||||
tail -F -n1 "$log_path" > "$templog" &
|
tail -F -n1 "$log_path" > "$templog" &
|
||||||
# get the PID of the tail command
|
# get the PID of the tail command
|
||||||
local pid_tail=$!
|
local pid_tail=$!
|
||||||
local inc=0
|
|
||||||
|
|
||||||
while ! grep --quiet "${line_match_new}" $templog && ! grep --quiet "${line_match_existing}" $templog
|
for i in $(seq 1 100)
|
||||||
do
|
do
|
||||||
# Timeout
|
if grep --quiet "${line_match_new}" $templog || grep --quiet "${line_match_existing}" $templog
|
||||||
if [ $inc -gt 100 ]
|
|
||||||
then
|
then
|
||||||
|
echo "Gitlab has correctly started." >&2
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
echo -n "." >&2
|
echo -n "." >&2
|
||||||
((inc++))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Stop Waiting"
|
echo "Stop Waiting"
|
||||||
|
|
Loading…
Reference in a new issue