]> git.donarmstrong.com Git - deb_pkgs/libapache-gallery-perl.git/blobdiff - debian/cron.daily
fixup for 1.0.2 release; use dh 8, mark conffiles
[deb_pkgs/libapache-gallery-perl.git] / debian / cron.daily
index f19666610e3782abb3be52f28e9fb49d581a3117..0fe36db8cd302a8a7cf7774e93f3143a3f23cf69 100644 (file)
@@ -6,18 +6,18 @@
 
 set -e
 
-cachedir=/var/tmp/Apache-Gallery
-user=www-data
+cachedir="/var/cache/www"
+user="www-data"
 
-if [ -d $cachedir ]; then
+if [ -d "$cachedir" ]; then
     # remove old files
     start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \
-       --oknodo --chuid $user -- -c \
-       "find $cachedir -type f -atime +6 -print0 | xargs -r0 rm -f"
+       --oknodo --chuid "$user" -- -c \
+       "find '$cachedir' -type f -atime +6 -delete"
     # remove empty directories
     start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \
-       --oknodo --chuid $user -- -c \
-       "find $cachedir -depth -type d -print0 | \
+       --oknodo --chuid "$user" -- -c \
+       "find '$cachedir' -depth -type d -print0 | \
         xargs -r0 rmdir --ignore-fail-on-non-empty"
 fi