/etc/cron.daily/kopano-client-update is in kopano-common 8.5.5-0ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/sh
CONFIG=/etc/kopano/server.cfg
test -f ${CONFIG} || exit 0
LOGPATH=$(grep -w client_update_log_path ${CONFIG} | grep -v \# | cut -d= -f2 | sed -e 's/[[:blank:]\r]//g')
if test -z "${LOGPATH}"; then
LOGPATH=/var/lib/kopano/client
fi
if ! test -r "${LOGPATH}"; then
exit 0
fi
LOGPATH=$(readlink -e ${LOGPATH})
if test -z "${LOGPATH}"; then
exit 0
fi
PATHDEPTH=$(echo -en ${LOGPATH} | sed -e 's_[^/]__g' | wc -c)
if test -n ${LOGPATH} -a ${PATHDEPTH} -gt 2 -a -d ${LOGPATH}; then
# remove all files older than 14 days
find ${LOGPATH} -mindepth 2 -maxdepth 2 -type f -ctime +14 -exec rm {} \;
# remove all empty directories
find ${LOGPATH} -mindepth 1 -maxdepth 1 -type d -exec rmdir --ignore-fail-on-non-empty {} \;
fi
|