Bug 33108: (follow-up) Don't let restart die if ES indexer not running
This fixes the restart action in koha-common to continue with starting services even if the last service cannot be stopped (because it may not be running) This needs a larger fix, to ensure all stopped services return a warning, for now 'do_stop' simply returns the last success/failure To test: 1 - Apply patch 2 - reset_all 3 - sudo koha-es-indexer --stop kohadev 4 - restart_all 5 - You are notified that ES indexer was not running 6 - You are notified that soem services could not be stopped 7 - The services are started Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
8e00746095
commit
02392b0c2b
1 changed files with 13 additions and 10 deletions
23
debian/koha-common.init
vendored
23
debian/koha-common.init
vendored
|
@ -214,18 +214,21 @@ case "$1" in
|
|||
do_stop
|
||||
case "$?" in
|
||||
0)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
log_daemon_msg "Successfully stopped all services for instance $NAME"
|
||||
log_end_msg 0
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
# Failed to stop something
|
||||
log_daemon_msg "Failed to stop some services for instance $NAME"
|
||||
log_end_msg 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
zebra_status
|
||||
sip_status
|
||||
|
|
Loading…
Reference in a new issue