File: tor.cron.weekly

package info (click to toggle)
tor 0.4.5.16-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 40,504 kB
  • sloc: ansic: 303,976; sh: 7,386; python: 1,822; makefile: 686; perl: 242
file content (16 lines) | stat: -rw-r--r-- 322 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

set -e
set -u

DEFAULTSFILE=/etc/default/tor

if [ -f $DEFAULTSFILE ] ; then
	. $DEFAULTSFILE
fi

if [ "${CLEANUP_OLD_COREFILES:-}" = "y" ] ; then
	if [ -d /var/lib/tor ] ; then
		find /var/lib/tor -mindepth 1 -maxdepth 1 -type f -mtime +21 -user debian-tor -regex '.*/core\(\.[0-9]+\)?' -exec rm '{}' +
	fi
fi