Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 53150 Details for
Bug 84639
mail-filter/dspam-3.4_p1 - version bump and ebuild fixes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
mail-filter/dspam/files/dspam.cron
dspam.cron (text/plain), 3.40 KB, created by
steveb
on 2005-03-10 18:35:59 UTC
(
hide
)
Description:
mail-filter/dspam/files/dspam.cron
Filename:
MIME Type:
Creator:
steveb
Created:
2005-03-10 18:35:59 UTC
Size:
3.40 KB
patch
obsolete
>#!/bin/bash ># Remove old signatures and unimportant tokens from the DSPAM database > >for foo in awk head tail >do > DSPAM_Check_App="$(${foo} --version 2>&1)" > if [[ "${DSPAM_Check_App/ *}" == "bash:" ]] > then > echo "Command ${foo} not found." > exit 1 > fi >done > >DSPAM_HOMEDIR="$(grep ^dspam /etc/passwd|awk -F : '{print $6}')" >[[ ! -d "${DSPAM_HOMEDIR}" ]] && exit 2 > >if [[ -f "${DSPAM_HOMEDIR}/mysql.data" ]] >then > DSPAM_MySQL_PURGE_SQL="" > [[ -f "${DSPAM_HOMEDIR}/config/mysql_purge.sql" ]] && DSPAM_MySQL_PURGE_SQL="${DSPAM_HOMEDIR}/config/mysql_purge.sql" > [[ -f "${DSPAM_HOMEDIR}/mysql_purge.sql" ]] && DSPAM_MySQL_PURGE_SQL="${DSPAM_HOMEDIR}/mysql_purge.sql" > [[ "${DSPAM_MySQL_PURGE_SQL}" == "" ]] && exit 3 > [[ ! -f "/usr/bin/mysql" ]] && exit 4 > DSPAM_MySQL_HOST="$(cat ${DSPAM_HOMEDIR}/mysql.data|head -n 1|tail -n 1)" > DSPAM_MySQL_PORT="$(cat ${DSPAM_HOMEDIR}/mysql.data|head -n 2|tail -n 1)" > DSPAM_MySQL_USER="$(cat ${DSPAM_HOMEDIR}/mysql.data|head -n 3|tail -n 1)" > DSPAM_MySQL_PWD="$(cat ${DSPAM_HOMEDIR}/mysql.data|head -n 4|tail -n 1)" > DSPAM_MySQL_DB="$(cat ${DSPAM_HOMEDIR}/mysql.data|head -n 5|tail -n 1)" > (/usr/bin/mysql -u ${DSPAM_MySQL_USER} -p"${DSPAM_MySQL_PWD}" ${DSPAM_MySQL_DB} < ${DSPAM_MySQL_PURGE_SQL}) 1>/dev/null 2>&1 > MYRC="$?" > for foo in $(/usr/bin/mysql -u ${DSPAM_MySQL_USER} -p"${DSPAM_MySQL_PWD}" ${DSPAM_MySQL_DB} -e 'SHOW TABLES;' 2>&1 | grep -v "^+\|^Tables_in_${DSPAM_MySQL_DB}") > do > (/usr/bin/mysql -u ${DSPAM_MySQL_USER} -p"${DSPAM_MySQL_PWD}" ${DSPAM_MySQL_DB} -e "OPTIMIZE TABLE ${foo};") 1>/dev/null 2>&1 > done > exit ${MYRC} >elif [[ -f "${DSPAM_HOMEDIR}/pgsql.data" ]] >then > DSPAM_PgSQL_PURGE_SQL="" > [[ -f "${DSPAM_HOMEDIR}/config/pgsql_purge.sql" ]] && DSPAM_PgSQL_PURGE_SQL="${DSPAM_HOMEDIR}/config/pgsql_purge.sql" > [[ -f "${DSPAM_HOMEDIR}/pgsql_purge.sql" ]] && DSPAM_PgSQL_PURGE_SQL="${DSPAM_HOMEDIR}/pgsql_purge.sql" > [[ "${DSPAM_PgSQL_PURGE_SQL}" == "" ]] && exit 3 > [[ ! -f "/usr/bin/psql" ]] && exit 4 > DSPAM_PgSQL_HOST="$(cat ${DSPAM_HOMEDIR}/pgsql.data|head -n 1|tail -n 1)" > DSPAM_PgSQL_PORT="$(cat ${DSPAM_HOMEDIR}/pgsql.data|head -n 2|tail -n 1)" > DSPAM_PgSQL_USER="$(cat ${DSPAM_HOMEDIR}/pgsql.data|head -n 3|tail -n 1)" > DSPAM_PgSQL_PWD="$(cat ${DSPAM_HOMEDIR}/pgsql.data|head -n 4|tail -n 1)" > DSPAM_PgSQL_DB="$(cat ${DSPAM_HOMEDIR}/pgsql.data|head -n 5|tail -n 1)" > (PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -U ${DSPAM_PgSQL_USER} -d ${DSPAM_PgSQL_DB} -p ${DSPAM_PgSQL_PORT} -h ${DSPAM_PgSQL_HOST} -f ${DSPAM_PgSQL_PURGE_SQL}) 1>/dev/null 2>&1 > exit $? >elif [[ -f "${DSPAM_HOMEDIR}/oracle.data" ]] >then > DSPAM_Oracle_PURGE_SQL="" > [[ -f "${DSPAM_HOMEDIR}/config/ora_purge.sql" ]] && DSPAM_Oracle_PURGE_SQL="${DSPAM_HOMEDIR}/config/ora_purge.sql" > [[ -f "${DSPAM_HOMEDIR}/ora_purge.sql" ]] && DSPAM_Oracle_PURGE_SQL="${DSPAM_HOMEDIR}/ora_purge.sql" > [[ "${DSPAM_Oracle_PURGE_SQL}" == "" ]] && exit 3 > [[ ! -f "/usr/bin/sqlplus" ]] && exit 4 > DSPAM_Oracle_DBLINK="$(cat ${DSPAM_HOMEDIR}/oracle.data|head -n 1|tail -n 1)" > DSPAM_Oracle_USER="$(cat ${DSPAM_HOMEDIR}/oracle.data|head -n 2|tail -n 1)" > DSPAM_Oracle_PWD="$(cat ${DSPAM_HOMEDIR}/oracle.data|head -n 3|tail -n 1)" > DSPAM_Oracle_SCHEMA="$(cat ${DSPAM_HOMEDIR}/oracle.data|head -n 4|tail -n 1)" > (/usr/bin/sqlplus -s ${DSPAM_Oracle_USER}/${DSPAM_Oracle_PWD} @${DSPAM_Oracle_PURGE_SQL}) 1>/dev/null 2>&1 > exit $? >else > [[ ! -f "/usr/bin/dspam_clean" ]] && exit 4 > /usr/bin/dspam_clean -s -p -u 1>/dev/null 2>&1 > exit $? >fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 84639
:
53019
| 53150 |
53154
|
53155