3
ADEI_PATH=${ADEI_PATH:-/srv/www/htdocs/adei}
4
ADEI_ADMIN=${ADEI_ADMIN:-0}
8
# Keep the first entry for compatibility with obsolete (but stable) docker containers
9
[ -f /adei/env ] && . /adei/env
10
[ -f /tmp/adei.env ] && . /tmp/adei.env
12
if [ "$ADEI_ADMIN" -ne 1 -a -f "/adei/cfg/.debug" ]; then
13
echo "$date ADEI is under debug, skipping..."
17
script=$( cd $(dirname "$0") && pwd )/$( basename "$0" )
18
if [ -f /adei/sys/adei_clean.manual.sh -a "$script" != /adei/sys/adei_clean.manual.sh ]; then
19
/adei/sys/adei_clean.manual.sh
23
adei_path="$ADEI_PATH"
24
path="$adei_path/tmp/log/"
25
find $path -type f -mtime +14 -delete;
27
# rsync seems faster way to delete huge (100k file+) directories
28
path="$adei_path/tmp/clients/"
30
find $path -mindepth 1 -maxdepth 1 -type d -print0 | xargs -0 -n 1 -P 4 -I '{}' sh -c 'echo {}; rsync -a --delete /tmp/empty/ {}/'
31
find $path -type d -empty -delete