SOSDG Spam Assassin Rules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

#!/bin/bash
VERSION=36
TAR=`which tar`
MYSQL=`which mysql`
EPOCH=`date +%s`
TARBALL="${VERSION}.tar.gz"
SHA1SUM=`which sha1sum`
DNSUSER="brielle"
DNSDOMAIN="*.3.sa.sosdg.org"
DNSDB="ns1-powerdns"
DNSTABLE="records"
${TAR} zvcf ../../${TARBALL} --exclude-vcs --exclude='*.sh' * ;\
cd ../../
${SHA1SUM} ${TARBALL} > ${TARBALL}.sha1
#echo -n "Mysql password: "
#stty -echo
#read password
#stty echo
#DNSSOA=`echo "SELECT content FROM ${DNSTABLE} WHERE domain_id='4'
# AND name='sosdg.org' AND type='SOA'" |\
# ${MYSQL} --user=${DNSUSER} --password=$password ${DNSDB}`
#DNSSOA2=( ${DNSSOA// / } )
#NEW_SOA="${DNSSOA2[1]} ${DNSSOA2[2]} $((${DNSSOA2[3]}+1)) ${DNSSOA2[4]} ${DNSSOA2[5]} ${DNSSOA2[6]} ${DNSSOA2[7]}"
#echo "UPDATE ${DNSTABLE} SET content='${VERSION}', change_date='${EPOCH}'
# WHERE name='${DNSDOMAIN}' AND type='TXT'" |\
# ${MYSQL} --user=${DNSUSER} --password=$password ${DNSDB}
#
#echo "UPDATE ${DNSTABLE} SET content='${NEW_SOA}', change_date='${EPOCH}'
# WHERE domain_id='4' AND name='sosdg.org' AND type='SOA'" |\
# ${MYSQL} --user=${DNSUSER} --password=$password ${DNSDB}
#unset password