tvheadend: don't test if the binary exists in the init script
authorCarlos Santos <casantos@datacom.ind.br>
Mon, 16 Apr 2018 02:29:43 +0000 (23:29 -0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 16 Apr 2018 05:35:03 +0000 (07:35 +0200)
The test doesn't make sense. It just exits without any error if the
binary doesn't exist, which is silly.

Replace the DAEMON variable, which was used only once, by the full path
of the binary file.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/tvheadend/S99tvheadend

index 65669ce404fbe5fd3969c03c868cc3cf0561e917..fc125a23058ed1678b1b9939d8941cb3c2cf0226 100644 (file)
@@ -5,11 +5,8 @@
 
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
 NAME=tvheadend
-DAEMON=/usr/bin/$NAME
 PIDFILE=/var/run/$NAME.pid
 
-[ -f "${DAEMON}" -a -x "${DAEMON}" ] || exit 0
-
 # Read configuration variable file if it is present
 [ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}"
 
@@ -29,7 +26,7 @@ fi
 case "$1" in
     start)
         printf "Starting TVHeadend daemon: "
-        if start-stop-daemon -S -q -p ${PIDFILE} -m --exec "${DAEMON}" -- ${ARGS}; then
+        if start-stop-daemon -S -q -p ${PIDFILE} -m --exec /usr/bin/tvheadend -- ${ARGS}; then
             printf "OK\n"
         else
             printf "failed\n"