From 43cad154aaa7778b51b884b24147b51656ae3596 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Aug 2008 18:11:26 +0200 Subject: two new cronscripts --- bin/check_registrations | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 bin/check_registrations (limited to 'bin/check_registrations') diff --git a/bin/check_registrations b/bin/check_registrations new file mode 100755 index 0000000..cc48d4a --- /dev/null +++ b/bin/check_registrations @@ -0,0 +1,28 @@ +#!/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 -- cgit v1.2.3