summaryrefslogtreecommitdiffstats
path: root/bin/check_project_backups
blob: 928a1ed9fc63a5c70c50552b824c4ae35c7086cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

dbquery() {
	mysql -s -s -e "$*" trac
}

# main function
main() {
	find /var/www/localhost/htdocs/backup/ -mindepth 1 -maxdepth 1 -ctime 7 | xargs rm -rf
}

# go to script dir
pushd $(dirname $0) > /dev/null

# get global functions
source "./functions.sh"

# load configuration
source "./config.sh"

# exit on errors
set -e

# start main program
main "$@"

# leave script dir
popd > /dev/null