From 795c05257f831da74be54620e67247aba116d577 Mon Sep 17 00:00:00 2001 From: woogerboy21 Date: Tue, 14 Jul 2015 15:10:25 -0400 Subject: [PATCH] Inactive accounts script description update Updated description in script to clarify things. --- servatrice/scripts/linux/maint_inactiveaccounts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servatrice/scripts/linux/maint_inactiveaccounts b/servatrice/scripts/linux/maint_inactiveaccounts index 9e77176c..29446356 100644 --- a/servatrice/scripts/linux/maint_inactiveaccounts +++ b/servatrice/scripts/linux/maint_inactiveaccounts @@ -1,9 +1,9 @@ #!/bin/bash -# SCHEDULE WITH CRONTAB BASED ON TIME PERIOD UNACTIVE ACCOUNT SHOULD BE REMOVED. UPDATE INTERVAL DATE TO BE NUMBER OF DAYS OLD (OR OLDER) TO REMOVE. +# SCHEDULE WITH CRONTAB ON A REGULAR BASIS. NUMBER OF DAYS IS THE AMOUNT OF DAYS TO KEEP INACTIVE ACCOUNTS (EX: 1 DAY REMOVES ALL INACTIVE ACCOUNTS OLDER THAN A SINGLE DAY). DBNAME="servatrice" #set this to the database name used TABLEPREFIX="cockatrice" #set this to the prefix used for the table names with in the database SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file NUMBEROFDAYS=5 #set this to the number of days to search for -mysql --defaults-file=$SQLCONFFILE -h localhost -e "delete from ""$DBNAME"".""$TABLEPREFIX""_users where active = 0 AND registrationDate < DATE_SUB(now(), INTERVAL ""$NUMBEROFDAYS"" DAY);" \ No newline at end of file +mysql --defaults-file=$SQLCONFFILE -h localhost -e "delete from ""$DBNAME"".""$TABLEPREFIX""_users where active = 0 AND registrationDate < DATE_SUB(now(), INTERVAL ""$NUMBEROFDAYS"" DAY);"