mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Improve ynh_exit_properly detection for case where failure happens right at the beginning
This commit is contained in:
parent
95d2c8f799
commit
899d3d4f10
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ ynh_exit_properly () {
|
|||
|
||||
# Wait for the log to be fill with the data until the crash.
|
||||
local timeout=0
|
||||
while ! tail --lines=20 "$ynh_log" | grep --quiet "ynh_exit_properly"
|
||||
while ! tail --lines=20 "$ynh_log" | grep --quiet "+ ynh_exit_properly"
|
||||
do
|
||||
((timeout++))
|
||||
if [ $timeout -eq 500 ]; then
|
||||
|
@ -52,7 +52,7 @@ ynh_exit_properly () {
|
|||
# Remove "yunohost.hook..."
|
||||
# Add DEBUG and color it at the beginning of each log line.
|
||||
echo -e "$(tail --lines=30 "$ynh_log" \
|
||||
| sed '1,/ynh_exit_properly/!d' \
|
||||
| sed '1,/+ ynh_exit_properly/!d' \
|
||||
| sed 's/^[[:digit:]: ,-]*//g' \
|
||||
| sed 's/ *yunohost.hook.*\]/ -/g' \
|
||||
| sed 's/^WARNING /&/g' \
|
||||
|
|
Loading…
Add table
Reference in a new issue