mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Do not ynh_die if systemctl action fails, because we don't want to exit in the middle of a remove script ... instead, return a non-zero code which should trigger script failure only if set -eu is enabled
This commit is contained in:
parent
6b2d76dddd
commit
29fe7c3103
2 changed files with 2 additions and 4 deletions
|
@ -32,7 +32,7 @@ ynh_wait_dpkg_free() {
|
|||
if echo "$dpkg_file" | grep --perl-regexp --quiet "^[[:digit:]]+$"
|
||||
then
|
||||
# If so, that a remaining of dpkg.
|
||||
ynh_print_err "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."
|
||||
ynh_print_err "dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."
|
||||
set -o xtrace # set -x
|
||||
return 1
|
||||
fi
|
||||
|
|
|
@ -149,11 +149,9 @@ ynh_systemd_action() {
|
|||
# If a log is specified for this service, show also the content of this log
|
||||
if [ -e "$log_path" ]
|
||||
then
|
||||
ynh_print_err --message="--"
|
||||
ynh_exec_err tail --lines=$length "$log_path"
|
||||
fi
|
||||
# Fail the app script, since the service failed.
|
||||
ynh_die
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Start the timeout and try to find line_match
|
||||
|
|
Loading…
Add table
Reference in a new issue