Do not pipe into less

This commit is contained in:
Maniack Crudelis 2019-02-18 00:11:04 +01:00 committed by GitHub
parent 9f3bf11fd0
commit 9052bb0b78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ ynh_systemd_action() {
echo "${action^} the service $service_name" >&2 echo "${action^} the service $service_name" >&2
systemctl $action $service_name \ systemctl $action $service_name \
|| ( journalctl --lines=$length -u $service_name >&2 \ || ( journalctl --no-pager --lines=$length -u $service_name >&2 \
; test -e "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2 \ ; test -e "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2 \
; false ) ; false )
@ -129,7 +129,7 @@ ynh_systemd_action() {
then then
echo "The service $service_name didn't fully started before the timeout." >&2 echo "The service $service_name didn't fully started before the timeout." >&2
echo "Please find here an extract of the end of the log of the service $service_name:" echo "Please find here an extract of the end of the log of the service $service_name:"
journalctl --lines=$length -u $service_name >&2 journalctl --no-pager --lines=$length -u $service_name >&2
test -e "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2 test -e "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2
fi fi