Print progression only after 3s

This commit is contained in:
Maniack Crudelis 2019-03-03 18:57:41 +01:00 committed by GitHub
parent 12c61eeb65
commit 337a065b4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,10 +124,17 @@ ynh_systemd_action() {
ynh_print_info --message="The service $service_name has correctly started."
break
fi
if [ $i -eq 3 ]; then
echo -n "Please wait, the service $service_name is ${action}ing" >&2
fi
if [ $i -ge 3 ]; then
echo -n "." >&2
fi
sleep 1
done
if [ $i -ge 3 ]; then
echo "" >&2
fi
if [ $i -eq $timeout ]
then
ynh_print_warn --message="The service $service_name didn't fully started before the timeout."