Nicer formatting for the output

This commit is contained in:
tcely 2025-04-10 14:44:25 -04:00 committed by GitHub
parent 66d8d5eec9
commit edd3c2767a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,11 +16,11 @@ fi
for service in $( svc_path "$@" )
do
printf -- 'Restarting %s...' "${service#${dir}/}"
printf -- 'Restarting %-28s' "${service#${dir}/}..."
_began="$( date '+%s' )"
/command/s6-svc -wr -r "${service}"
_ended="$( date '+%s' )"
printf -- '\tcompleted (in %d seconds).\n' \
printf -- '\tcompleted (in %2.1d seconds).\n' \
"$( expr "${_ended}" - "${_began}" )"
done
unset -v _began _ended service