3 # VDR directory environment
6 VIDEODIR=/var/spool/video
9 ## arg 1: the new package version
12 echo "********************************************************************"
13 echo " Configuration files are installed in ${CONFDIR} and should be"
14 echo ' owned by "'${VDR_USER}':'${VDR_USER}'"'
16 echo " NOTE: The template runvdr script that comes with the vdr source"
17 echo " is installed in /usr/share/doc/vdr, NOT in /usr/bin. To make a"
18 echo " fully working installation either copy the template to /usr/bin,"
19 echo " edit it as necessary and then make it executable or use one of"
20 echo " the alternative runvdr scripts that can be found by searching"
21 echo " the Internet, e.g. runvdr-extreme."
22 echo "********************************************************************"
24 if ! getent passwd ${VDR_USER} >/dev/null; then
25 echo -n 'Creating VDR user "'${VDR_USER}'"...'
26 [ ! -e ${VIDEODIR} ] && mkdir -p ${VIDEODIR}
27 [ ! -e ${EPGDIR} ] && mkdir -p ${EPGDIR}
28 usr/sbin/groupadd -g 199 ${VDR_USER} >/dev/null
29 /usr/sbin/useradd -r -d ${VIDEODIR} -g ${VDR_USER} -G video -s /bin/false -c "Video Disk Recorder" ${VDR_USER} &>/dev/null
30 passwd -l ${VDR_USER} &>/dev/null
31 chown -R ${VDR_USER}:${VDR_USER} ${CONFDIR}
32 chown ${VDR_USER}:${VDR_USER} ${VIDEODIR}
33 chown ${VDR_USER}:${VDR_USER} ${EPGDIR}
37 echo 'VDR user "'${VDR_USER}'" already exists. Check that:'
38 echo '1. "'${CONFDIR}'" and vdr configuration files are owned by "'${VDR_USER}':'${VDR_USER}'"'
39 echo '2. "'${VIDEODIR}'" exists and is owned by "'${VDR_USER}':'${VDR_USER}'"'
40 echo '3. "'${EPGDIR}'" exists and is owned by "'${VDR_USER}':'${VDR_USER}'"'
45 ## arg 1: the new package version
46 ## arg 2: the old package version
51 # arg 1: the old package version
53 echo 'VDR user "'${VDR_USER}'", "'${EPGDIR}'" and "'${VIDEODIR}'" will not be deleted.'