Browse Source

tvheadend: don't test if the binary exists in the init script

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>
Carlos Santos 7 năm trước cách đây
mục cha
commit
c9dbe881e5
1 tập tin đã thay đổi với 1 bổ sung4 xóa
  1. 1 4
      package/tvheadend/S99tvheadend

+ 1 - 4
package/tvheadend/S99tvheadend

@@ -5,11 +5,8 @@
 
 
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
 NAME=tvheadend
 NAME=tvheadend
-DAEMON=/usr/bin/$NAME
 PIDFILE=/var/run/$NAME.pid
 PIDFILE=/var/run/$NAME.pid
 
 
-[ -f "${DAEMON}" -a -x "${DAEMON}" ] || exit 0
-
 # Read configuration variable file if it is present
 # Read configuration variable file if it is present
 [ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}"
 [ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}"
 
 
@@ -29,7 +26,7 @@ fi
 case "$1" in
 case "$1" in
     start)
     start)
         printf "Starting TVHeadend daemon: "
         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"
             printf "OK\n"
         else
         else
             printf "failed\n"
             printf "failed\n"