summaryrefslogblamecommitdiffstats
path: root/bin/check_registrations
blob: 6146831e59d212923b5a076a7860673ccadc16ad (plain) (tree)
1
2
3
4
5
6
7
8
9







                                
                                                                                            


















                               
#!/bin/bash

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

# main function
main() {
	dbquery "delete from user where activated = 0 and adddate(date_added,7) < curdate()"
}

# 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