summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Bornkessel <hd_brummy@gentoo.org>2009-04-16 00:28:31 +0000
committerJörg Bornkessel <hd_brummy@gentoo.org>2009-04-16 00:28:31 +0000
commit153cd09bf726582bcd5e3838dbc3f01df20faae7 (patch)
treea43bd744a4e9631e39c166454137cef205cb8871 /www-misc/xxv/files
parentStable for HPPA (bug #239538). (diff)
downloadgentoo-2-153cd09bf726582bcd5e3838dbc3f01df20faae7.tar.gz
gentoo-2-153cd09bf726582bcd5e3838dbc3f01df20faae7.tar.bz2
gentoo-2-153cd09bf726582bcd5e3838dbc3f01df20faae7.zip
version bump
(Portage version: 2.1.6.7/cvs/Linux i686)
Diffstat (limited to 'www-misc/xxv/files')
-rw-r--r--www-misc/xxv/files/xxv.utf8-v3112
1 files changed, 112 insertions, 0 deletions
diff --git a/www-misc/xxv/files/xxv.utf8-v3 b/www-misc/xxv/files/xxv.utf8-v3
new file mode 100644
index 000000000000..cb8a3af74276
--- /dev/null
+++ b/www-misc/xxv/files/xxv.utf8-v3
@@ -0,0 +1,112 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/www-misc/xxv/files/xxv.utf8-v3,v 1.1 2009/04/16 00:28:31 hd_brummy Exp $
+
+RUNAS_USER="root"
+
+# Set Verbose Level 0 -> 5
+VERBOSE="5"
+
+#set -xv
+
+# some fixed Path
+CONFIGFILE="/etc/xxv/xxvd.cfg"
+PIDFILE="/var/run/xxv/xxvd.pid"
+XXV_BIN="/usr/bin/xxvd"
+LOGFILE="/var/log/xxv/xxvd.log"
+
+depend() {
+ after vdr
+ after net
+}
+
+xxv_logger() {
+ printf "\tXXV running as user: ${RUNAS_USER}\n" >> "${LOGFILE}"
+ printf "\tVerbose Level: ${VERBOSE}\n" >> "${LOGFILE}"
+ printf "\tYou can change this in xxv init script\n\n" >> "${LOGFILE}"
+}
+
+check_vdradmin() {
+
+ # Check at first, is VDR-Admin running
+ # Stopping, while running on same ports
+ if [ -n "`netstat -anp | grep vdradmin | grep 8080`" ] ; then
+ echo
+ eerror "VDR-Admin will Stop at first now"
+ eerror "vdradmin and xxv can not run on the same port"
+ echo
+ /etc/init.d/vdradmin stop
+ fi
+}
+
+xxv_kill_pid() {
+
+ # After unclear stop, xxvd.pid will not removed, fixed with next line
+ if [ ! -x /etc/init.d/root ]; then
+ [ -e ${PIDFILE} -a ! -L /var/lib/init.d/started/xxv ]
+ rm ${PIDFILE}
+ killall xxvd 2> /dev/null
+ fi
+
+}
+
+xxv_kill_initfile() {
+
+ # After unclear stop, init file in /var/lib/init.d/started/ still not removed
+
+ if [ ! -x /etc/init.d/root ]; then
+ [ -L /var/lib/init.d/started/xxv -a ! -e ${PIDFILE} ]
+ rm /var/lib/init.d/started/xxv
+ /etc/init.d/xxv zap
+ killall xxvd 2> /dev/null
+ fi
+
+}
+
+set_utf8_charset() {
+ local capfile=/usr/share/vdr/capabilities.sh
+ [ -e "${capfile}" ] && . ${capfile}
+ if [ "${CAP_UTF8}" = "1" -o "${VDR_CAN_HANDLE_UTF8}" = "yes" ]; then
+ # do not clean out utf8
+ XXV_UTF8="-utf8"
+ printf "\txxv starting with utf-8 support\n" >> "${LOGFILE}"
+ fi
+}
+
+start() {
+ check_vdradmin
+ xxv_logger
+ set_utf8_charset
+
+ ebegin "Start xxv"
+ echo
+ einfo "xxv running as user: ${RUNAS_USER}"
+ einfo "Verbose Level: ${VERBOSE}"
+
+ start-stop-daemon --nicelevel 15 --pidfile ${PIDFILE} --start -c ${RUNAS_USER} --exec ${XXV_BIN} -- \
+ ${XXV_UTF8} -configfile=${CONFIGFILE} -verbose=${VERBOSE} -pidfile=${PIDFILE}
+ eend $?
+}
+
+
+stop() {
+
+ ebegin "Stopping xxvd"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+
+ xxv_kill_pid
+ xxv_kill_initfile
+
+ eend $?
+}
+
+restart() {
+
+ xxv_kill_pid
+ xxv_kill_initfile
+
+
+ svc_stop
+ svc_start
+}