From 43434c2f6a84ec5ad294c23506d6aff4ebd96c70 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 16 Dec 2012 23:56:34 +0100 Subject: Moving removal of backup and temporary files to their own hook script. --- share/hooks/0150-remove-temporary-files.chroot | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 share/hooks/0150-remove-temporary-files.chroot (limited to 'share/hooks/0150-remove-temporary-files.chroot') diff --git a/share/hooks/0150-remove-temporary-files.chroot b/share/hooks/0150-remove-temporary-files.chroot new file mode 100755 index 000000000..21bc5ee6f --- /dev/null +++ b/share/hooks/0150-remove-temporary-files.chroot @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +# Remove temporary files +for _DIRECTORY in /tmp /var/tmp +do + rm -rf ${_DIRECTORY} + + mkdir -p ${_DIRECTORY} + chmod 1777 ${_DIRECTORY} +done -- cgit v1.2.3