commit - be65ef492789ea55ea25f290ecf4b5093a0ccda5
commit + 83da8a758a6a97a51b74cd016ca688b55963a48f
blob - /dev/null
blob + f4700393c8850298b0721eb2db7dae8869d76c5e (mode 755)
--- /dev/null
+++ ads
+#!/bin/sh
+#
+cd /var/unbound/etc/
+(curl --silent https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | grep '^0\.0\.0\.0' | sort) | awk '{print "local-zone: \""$2"\" refuse"}' > ads.conf
+chown _unbound:_unbound /var/unbound/etc/ads.conf
+rcctl reload unbound
blob - /dev/null
blob + b1197dcfbd5475a569e3a98571c43a79bca8133e (mode 755)
--- /dev/null
+++ certs
+#!/bin/sh
+#
+
+## debug
+#set -x
+
+UPDATE=0
+
+for domain in $(awk '/^domain/ { print $2 }' /etc/acme-client.conf)
+do
+ acme-client $domain
+ if [ $? -eq 0 ]; then
+ UPDATE=1
+ fi
+done
+
+if [ $UPDATE -ne 0 ]; then
+ /etc/rc.d/httpd -fd restart
+ /etc/rc.d/smtpd -fd restart
+ /etc/rc.d/relayd -fd restart
+fi
blob - /dev/null
blob + 687dd01aca75d443f8ffb9ac75cfbc1156106a37 (mode 755)
--- /dev/null
+++ check-dns
+#!/bin/sh
+#DNS lookup scripts for Zabbix monitor. Conditional return
+# of valid IP | 0 for failed lookup.
+
+HOST_QUERY=$1
+
+if [`host $HOST_QUERY | grep "has address" | wc -l` -eq 0 ]; then
+ #lookup failed, bad DNS lookup
+ echo "0"
+else
+
+#String eval returns valid IP address
+LOOKUP=`host -cIN $HOST_QUERY`
+echo ${LOOKUP#$HOST_QUERY has address}
+
+fi
blob - /dev/null
blob + 44cecf51bfd8fbfddd1554954c2b58a61d95290a (mode 755)
--- /dev/null
+++ dump_partition
+#!/bin/sh
+
+_TIMESTAMP=$(date -u +%G%m%dT%H%M%SZ)
+
+dump -0 -a -u -f - /var/www | ssh -p9999 backup-user@backup.google.com "cat > www-${_TIMESTAMP}-level-0.dump"
+dump -0 -a -u -f - /var/vmail | ssh -p9999 backup-user@backup.google.com "cat > mails-${_TIMESTAMP}-level-0.dump"
blob - /dev/null
blob + 81ceb2bff7791e2fcd7825654715f12838f156f4 (mode 755)
--- /dev/null
+++ limpiar_cola
+#!/bin/sh
+#
+# Sometime you need to clean the queue of smtpd and
+# you don't have a bidet.
+#
+for i in $(smtpctl show queue | cut -d'|' -f1); do smtpctl remove $i; done
blob - /dev/null
blob + 278024606ea01ca6850286d66593a44e53ba42e6 (mode 755)
--- /dev/null
+++ reboot-ipmi
+#!/bin/sh
+#
+# Cold reset for supermicro shitty ipmi
+#
+
+cd /root && ifconfig em1 100.100.100.123 && \
+ ifconfig em1 up && \
+ ipmitool -I lanplus -U gonzalo -f pass -H 100.100.100.254 mc reset cold