libgtk3: remove non-existent configure options
[buildroot-gz.git] / package / tvheadend / S99tvheadend
blob65669ce404fbe5fd3969c03c868cc3cf0561e917
1 #! /bin/sh
2 # tvheadend startup script inspired by the Debian one in the package
4 # Author: Yann E. MORIN <yann.morin.1998@free.fr>
6 PATH=/usr/sbin:/usr/bin:/sbin:/bin
7 NAME=tvheadend
8 DAEMON=/usr/bin/$NAME
9 PIDFILE=/var/run/$NAME.pid
11 [ -f "${DAEMON}" -a -x "${DAEMON}" ] || exit 0
13 # Read configuration variable file if it is present
14 [ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}"
16 ARGS="-f"
17 [ -z "${TVH_USER}" ] || ARGS="${ARGS} -u ${TVH_USER}"
18 [ -z "${TVH_GROUP}" ] || ARGS="${ARGS} -g ${TVH_GROUP}"
19 [ -z "${TVH_ADAPTERS}" ] || ARGS="${ARGS} -a ${TVH_ADAPTERS}"
20 [ -z "${TVH_HTTP_PORT}" ] || ARGS="${ARGS} -w ${TVH_HTTP_PORT}"
21 [ -z "${TVH_HTSP_PORT}" ] || ARGS="${ARGS} -e ${TVH_HTSP_PORT}"
22 [ "${TVH_DEBUG}" = "1" ] && ARGS="${ARGS} -s"
24 # If first run, start in wizard mode
25 if [ -z "$(ls -1 /home/tvheadend/.hts/tvheadend/accesscontrol/ 2>/dev/null)" ]; then
26 ARGS="${ARGS} -C"
29 case "$1" in
30 start)
31 printf "Starting TVHeadend daemon: "
32 if start-stop-daemon -S -q -p ${PIDFILE} -m --exec "${DAEMON}" -- ${ARGS}; then
33 printf "OK\n"
34 else
35 printf "failed\n"
38 stop)
39 printf "Stopping TVHeadend daemon: "
40 start-stop-daemon -K -q -p ${PIDFILE} -s TERM
41 sleep 2
42 if start-stop-daemon -K -q -p ${PIDFILE} -t; then
43 printf "failed, killing: "
44 start-stop-daemon -K -q -p ${PIDFILE} -s KILL -o
46 printf "OK\n"
48 restart|force-reload)
49 "${0}" stop
50 sleep 2
51 "${0}" start
54 echo "Usage: $0 {start|stop|restart|force-reload}" >&2
55 exit 1
57 esac