Author: jarod
Update of /cvs/free/rpms/mythtv/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv22430
Added Files:
mythbackend.init mythbackend.logrotate mythbackend.sysconfig
Removed Files:
mythbackend.init.in mythbackend.logrotate.in
mythbackend.sysconfig.in
Log Message:
narf, forgot these have changed since I last touched the devel branch too...
--- NEW FILE mythbackend.init ---
#!/bin/bash
#
# Startup script for mythbackend
#
# chkconfig: - 86 14
# description: mythbackend.
# processname: mythbackend
# pidfile: /var/run/mythbackend.pid
# config:
# Source function library.
. /etc/init.d/functions
if [ -f /etc/sysconfig/mythbackend ]; then
. /etc/sysconfig/mythbackend
fi
## Defaults, override them in /etc/sysconfig/mythbackend
MYTHTV_HOME=${MYTHTV_HOME:-/etc/mythtv}
MYTHBACKEND_USER=${MYTHBACKEND_USER:-root}
binary=/usr/bin/mythbackend
prog=mythbackend
RETVAL=0
OPTIONS="$OPTIONS --daemon --user ${MYTHBACKEND_USER} --logfile
/var/log/mythtv/$prog.log --pidfile /var/run/$prog.pid"
start() {
echo -n $"Starting $prog: "
touch /var/run/mythbackend.pid
if [ "${MYTHBACKEND_USER}" != root ]; then
chown ${MYTHBACKEND_USER}:${MYTHBACKEND_USER} /var/run/mythbackend.pid
if [ -d /dev/dvb ]; then
/usr/bin/setfacl -m u:${MYTHBACKEND_USER}:rwx -R /dev/dvb/
fi
if [ -d /dev/snd ]; then
/usr/bin/setfacl -m u:${MYTHBACKEND_USER}:rwx -R /dev/snd/
fi
for f in $(ls /dev/video* 2>/dev/null); do
/usr/bin/setfacl -m u:${MYTHBACKEND_USER}:rw- $f
done
for f in $(ls /dev/vbi* 2>/dev/null); do
/usr/bin/setfacl -m u:${MYTHBACKEND_USER}:rw- $f
done
fi
export MYTHCONFDIR="$MYTHTV_HOME"
export HOME="$MYTHTV_HOME"
daemon $binary $OPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $binary
RETVAL=$?
if [ "${MYTHBACKEND_USER}" != root ]; then
if [ -d /dev/dvb ]; then
/usr/bin/setfacl -x u:${MYTHBACKEND_USER} -R /dev/dvb/
fi
if [ -d /dev/snd ]; then
/usr/bin/setfacl -x u:${MYTHBACKEND_USER} -R /dev/snd/
fi
for f in $(ls /dev/video* 2>/dev/null); do
/usr/bin/setfacl -x u:${MYTHBACKEND_USER} $f
done
for f in $(ls /dev/vbi* 2>/dev/null); do
/usr/bin/setfacl -x u:${MYTHBACKEND_USER} $f
done
fi
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog /var/run/$prog.pid
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
stop
start
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|status|restart}"
exit 1
esac
exit $RETVAL
--- NEW FILE mythbackend.logrotate ---
/var/log/mythtv/mythbackend.log {
notifempty
missingok
compress
compresscmd /usr/bin/bzip2
uncompresscmd /usr/bin/bunzip2
compressext .bz2
weekly
rotate 4
size 10M
postrotate
/bin/kill -HUP `cat /var/run/mythbackend.pid 2>/dev/null` 2> /dev/null ||
true
endscript
}
--- NEW FILE mythbackend.sysconfig ---
#MYTHTV_HOME=/etc/mythtv
# mythbackend runs as root by default, but support for running as a non-root
# user should be functional. However, switching to a non-root user on an
# existing setup will require fixing up permissions on files mythbackend
# needs access to -- particularly, your recordings, which are owned by the
# user mythbackend runs as. If you switch from running as root to running as
# user mythtv, deleting existing recordings won't work until their file
# ownership has been changed from root to mythtv as well.
#MYTHBACKEND_USER=mythtv
#OPTIONS=
--- mythbackend.init.in DELETED ---
--- mythbackend.logrotate.in DELETED ---
--- mythbackend.sysconfig.in DELETED ---
Show replies by date