summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-misc/vdradmin-am/files/vdradmin-3.6.6.init')
-rw-r--r--www-misc/vdradmin-am/files/vdradmin-3.6.6.init14
1 files changed, 9 insertions, 5 deletions
diff --git a/www-misc/vdradmin-am/files/vdradmin-3.6.6.init b/www-misc/vdradmin-am/files/vdradmin-3.6.6.init
index 2d689c803ca9..8082613f6bdb 100644
--- a/www-misc/vdradmin-am/files/vdradmin-3.6.6.init
+++ b/www-misc/vdradmin-am/files/vdradmin-3.6.6.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/files/vdradmin-3.6.6.init,v 1.1 2010/03/16 17:18:47 billie Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/files/vdradmin-3.6.6.init,v 1.2 2010/04/22 17:11:25 billie Exp $
depend() {
use vdr
@@ -29,11 +29,15 @@ start() {
sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 0-" /etc/vdradmin/vdradmind.conf
fi
- # Guarantee that vdradmin can access its dirs
- chown -R "${VDRADMIN_USER}:vdradmin" /var/cache/vdradmin
- chown -R "${VDRADMIN_USER}:vdradmin" /var/log/vdradmin
- chown -R "${VDRADMIN_USER}:vdradmin" /var/run/vdradmin
+ # Prepare directories
+ local folder
chown -R "${VDRADMIN_USER}:vdradmin" /etc/vdradmin
+ for folder in cache log run; do
+ if [ ! -d /var/${folder}/vdradmin ]; then
+ mkdir /var/${folder}/vdradmin
+ fi
+ chown -R "${VDRADMIN_USER}:vdradmin" /var/${folder}/vdradmin
+ done
if [ -x /etc/init.d/root ]; then
# running on baselayout-2/openrc