From 598f559cb9cfab3fe5533d2cd2ba2d04c6fc6ce1 Mon Sep 17 00:00:00 2001 From: Thomas Meissner Date: Fri, 11 Mar 2016 22:12:50 +0100 Subject: [PATCH] =?UTF-8?q?Anpassung=20f=C3=BCr=20Debian=20Jessie=20und=20?= =?UTF-8?q?Return-Code=20zur=C3=BCckzugeben?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doorpi/docs/service/doorpi.tpl | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/doorpi/docs/service/doorpi.tpl b/doorpi/docs/service/doorpi.tpl index a72cfe37..485c22c4 100755 --- a/doorpi/docs/service/doorpi.tpl +++ b/doorpi/docs/service/doorpi.tpl @@ -21,7 +21,7 @@ SCRIPTNAME=!!daemon_folder!!/!!daemon_name!! # Exit if the package is not installed if [ none != "$DAEMON" ] && [ ! -x "$DAEMON" ] ; then - exit 0 + exit 3 fi # Read configuration variable file if it is present @@ -57,13 +57,16 @@ do_stop_cmd() return 0 } +EX=0 case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start_cmd case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + 2) + [ "$VERBOSE" != no ] && log_end_msg 1 + EX=1 ;; esac ;; stop) @@ -71,7 +74,9 @@ case "$1" in do_stop_cmd case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + 2) + [ "$VERBOSE" != no ] && log_end_msg 1 + EX=1 ;; esac ;; restart) @@ -90,7 +95,9 @@ case "$1" in do_start_cmd case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + 2) + [ "$VERBOSE" != no ] && log_end_msg 1 + EX=1 ;; esac ;; status) @@ -101,3 +108,5 @@ case "$1" in exit 3 ;; esac + +exit $EX