mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Check if file exist
This commit is contained in:
parent
8e8ed22395
commit
af82be4ffd
1 changed files with 6 additions and 6 deletions
|
@ -104,7 +104,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 --lines=$length -u $service_name >&2 \
|
||||||
; test -n "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2 \
|
; test -e "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2 \
|
||||||
; false )
|
; false )
|
||||||
|
|
||||||
# Start the timeout and try to find line_match
|
# Start the timeout and try to find line_match
|
||||||
|
@ -127,7 +127,7 @@ ynh_systemd_action() {
|
||||||
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 --lines=$length -u $service_name >&2
|
||||||
test -n "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2
|
test -e "$log_path" && echo "--" && tail --lines=$length "$log_path" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
Loading…
Add table
Reference in a new issue