more maketank roles for mx

This commit is contained in:
2025-08-25 14:49:08 +02:00
parent 30ce409c4e
commit cacd6df076
9 changed files with 49 additions and 73 deletions

View File

@@ -0,0 +1,6 @@
#!/bin/bash
mariadb --skip-ssl -h 10.201.0.4 -u maketank -pknatekam2007 \
-B --database=maketank_froxlor \
-e 'select email_full from mail_virtual where disablegreylist = 1' \
|grep -v email_full >/etc/postgrey/whitelist_recipients.local

View File

@@ -1,30 +0,0 @@
#!/bin/bash
##### PUPPET ###############
# from here: http://hostingondemand.nl/techniek/pdns-clean-up-script/
# Dependencies:
# bind-utils
# sqlite3
#### Config ################################
DB="/var/lib/powerdns/pdns.sqlite3"
#### End of Config #########################
SQL="/usr/bin/sqlite3 ${DB}"
check() {
dig @$1 $2 -t SOA +noall +answer +nocomment | grep -q maketank.net
if [ $? != 0 ]; then
echo "$1 $2: Server not AUTH or SERVfail - removing zone..."
DOMAIN_ID=`$SQL "SELECT id FROM domains WHERE name=\'$2\' AND type=\'SLAVE\' AND master=\'$1\' LIMIT 1;"`
$SQL "DELETE FROM records WHERE domain_id=\'$DOMAIN_ID\';"
$SQL "DELETE FROM domains WHERE id=\'$DOMAIN_ID\';"
fi
}
MASTERS=(`$SQL "SELECT DISTINCT ip FROM supermasters;"`)
for m in "${MASTERS[@]}"; do
NAMES=(`$SQL "SELECT name FROM domains WHERE type = \'SLAVE\' AND master = \'${m}\';"`)
for d in "${NAMES[@]}"; do
check ${m} ${d}
done
done

View File

@@ -1,18 +0,0 @@
#!/bin/bash
echo
echo "FailoverIPs on hosts"
OUT=$(curl -u '#ws+7PVgXWxp:UypGThnJ5KJDXTCN' https://robot-ws.your-server.de/failover 2>/dev/null)
#OUT=$(cat fo)
#echo $OUT |
jq -a -r '.[] | [ .failover.ip, .failover.active_server_ip ] | @csv' <<< $OUT |
while read -r line
do
line=$(sed 's/"//g' <<< $line)
IFS=',' read -r -a arr <<< "$line"
FOIP=$(dig -x ${arr[0]} +short)
HOST=$(dig -x ${arr[1]} +short)
printf "%15s %20s => %15s %20s\n" ${arr[0]} ${FOIP::-1} ${arr[1]} ${HOST::-1}
done
echo
echo

View File

@@ -1,5 +0,0 @@
#!/bin/bash
echo
virsh list --all
echo