[RFC PATCH 12/12] init-d-script: fix fancy printing on try-restart
Trek
trek00 at inbox.ru
Thu Jul 2 18:19:45 BST 2020
---
debian/init-d-script | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/debian/init-d-script b/debian/init-d-script
index 749199a9..d600f020 100755
--- a/debian/init-d-script
+++ b/debian/init-d-script
@@ -246,14 +246,14 @@ case "$1" in
call do_restart
;;
try-restart)
- log_daemon_msg "Trying to restart $DESC" "$NAME"
- if call do_status > /dev/null 2>&1 ; then
- call do_restart
- log_end_msg $?
+ vlog_daemon_msg "Trying to restart $DESC" "$NAME"
+ if $0 $SCRIPTNAME status >/dev/null 2>&1 ; then
+ VERBOSE=no call do_restart
else
- log_progress_msg "is not running."
- log_end_msg 0
+ [ "$VERBOSE" != no ] && log_progress_msg "not running"
+ true
fi
+ vlog_end_msg $?
;;
'')
call do_usage
--
2.20.1
More information about the Debian-init-diversity
mailing list