summaryrefslogtreecommitdiff
path: root/runvdr
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-12-31 13:30:11 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-12-31 13:30:11 +0100
commit89df44971574415bd51f4eb01f8e085fb6266dc1 (patch)
treede77f5c86cb1cca0942038e98a945539479bc843 /runvdr
parentc65133979fa79f0695a126c0324c4917e51242d8 (diff)
downloadvdr-89df44971574415bd51f4eb01f8e085fb6266dc1.tar.gz
vdr-89df44971574415bd51f4eb01f8e085fb6266dc1.tar.bz2
When started as user 'root' VDR now switches to a lesser privileged user id, keeping the capability to set the system time
Diffstat (limited to 'runvdr')
-rwxr-xr-xrunvdr8
1 files changed, 4 insertions, 4 deletions
diff --git a/runvdr b/runvdr
index 76fd5f08..7fd4d819 100755
--- a/runvdr
+++ b/runvdr
@@ -7,7 +7,7 @@
#
# Set the environment variable VDRUSR to the user id you
# want VDR to run with. If VDRUSR is not set, VDR will run
-# as 'root', which is not necessarily advisable.
+# as user 'vdr'.
#
# Since this script loads the DVB driver, it must be started
# as user 'root'.
@@ -18,11 +18,11 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: runvdr 1.14 2004/11/21 11:30:00 kls Exp $
+# $Id: runvdr 1.15 2005/12/31 13:30:11 kls Exp $
DVBDIR="../DVB/driver"
VDRPRG="./vdr"
-VDRCMD="$VDRPRG -w 60 $*"
+VDRCMD="$VDRPRG -u $VDRUSR -w 60 $*"
LSMOD="`/sbin/lsmod | grep -w '^dvb' | wc -l`"
KILL="/usr/bin/killall -q -TERM"
@@ -33,7 +33,7 @@ if [ $LSMOD -eq 0 ] ; then
fi
while (true) do
- su $VDRUSR -c "$VDRCMD"
+ $VDRCMD
if test $? -eq 0 -o $? -eq 2; then exit; fi
date
echo "restarting VDR"