summaryrefslogtreecommitdiff
path: root/media-plugins/vdr-graphtft/files/graphtft-fe
blob: 5803b5728ed992858a9d2a824ae581638716908e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/sbin/openrc-run
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

. /etc/conf.d/vdr.graphtft

export DISPLAY=${GRAPHTFT_DISPLAY}

:   ${GRAPHTFT_USER:=root}

OPTIONS="-h ${GRAPHTFT_HOST:=127.0.0.1}"
OPTIONS="${OPTIONS} -p ${GRAPHTFT_PORT:=2039}"
OPTIONS="${OPTIONS} -e ${GRAPHTFT_LOG_LEVEL:=0}"
OPTIONS="${OPTIONS} -W ${GRAPHTFT_SCREEN_WIDTH:=800}"
OPTIONS="${OPTIONS} -H ${GRAPHTFT_SCREEN_HEIGHT:=480}"
[ "${GRAPHTFT_NO_FRAME}" = "yes" ] && OPTIONS="${OPTIONS} -n"
[ "${GRAPHTFT_RESIZE_IMAGE}" = "yes" ] && OPTIONS="${OPTIONS} -r"

# -d <file>       dump each image to file (default off)

start() {
		ebegin "starting graphtft-fe ..."
		start-stop-daemon --make-pidfile --background --pidfile /var/run/graphtft-fe.pid \
        --chuid ${GRAPHTFT_USER} --start --exec /usr/bin/graphtft-fe  -- ${OPTIONS}
		eend $?
}

stop() {
		ebegin "stopping graphtft ..."
		start-stop-daemon --stop --pidfile /var/run/graphtft-fe.pid
		eend $?
}