Instantly share code, notes, and snippets.

View sks-build.md
mkdir -p /var/src/
cd /var/src/
hg clone https://bitbucket.org/skskeyserver/sks-keyserver
cd sks-keyserver
eval $(opam config env)
cp Makefile.local.unused Makefile.local
sed -i 's/-ldb-4.6/-ldb-5.3/g' Makefile.local
curl -L https://gist.githubusercontent.com/mattrude/5c331f76c02060301874b376f3248774/raw/sks-keyserver_-_change_download_type_to_text.patch -o sks-keyserver_-_change_download_type_to_text.patch -s
curl -L https://gist.githubusercontent.com/mattrude/5c331f76c02060301874b376f3248774/raw/sks-keyserver_-_update_stats_page.patch -o sks-keyserver_-_update_stats_page.patch -s
View cloudkey-update-cert.sh
#!/bin/sh
HOSTNAME="unifi.lan.therudes.com"
EMAIL="matt@mattrude.com"
# Update the System before we start
rm -f /tmp/installed-packages.txt
echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list
dpkg --get-selections |awk '{print $1}' |sed 's/:amd64//g' |sed 's/:armhf//g' > /tmp/installed-packages.txt
UPDATE="" # Start out with UPDATE being NULL
View update-blocklist.sh
#!/bin/bash
DATABASE="/var/lib/prosody/prosody.sqlite"
OLDMD5=`md5sum /etc/prosody/blocklist.pfw |awk '{ print $1 }'`
if [ ! -f /usr/bin/jq ]; then
apt update
apt -y install jq
fi
View ServerStatus-Custom-README.md

ServerStatus Custom

Installing The Custom Patch

Start by downloading the ServerStatus package

mkdir -p /var/src/ && cd /var/src/
git clone https://github.com/iNPUTmice/ServerStatus.git

Download and Patch the orignal software

View ServerStatus-Custom.patch
diff --git a/src/main/java/im/conversations/status/Main.java b/src/main/java/im/conversations/status/Main.java
index 9e5d4b9..b40b909 100644
--- a/src/main/java/im/conversations/status/Main.java
+++ b/src/main/java/im/conversations/status/Main.java
@@ -57,7 +57,7 @@ public class Main {
get("/:domain/", Controller.getStatus, templateEngine);
ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(5);
for (Credentials credentials : Configuration.getInstance().getCredentials()) {
- scheduledThreadPoolExecutor.scheduleAtFixedRate(new ServerStatusChecker(credentials, Configuration.getInstance().getPingTargets()), 0, 2, TimeUnit.MINUTES);
+ scheduledThreadPoolExecutor.scheduleAtFixedRate(new ServerStatusChecker(credentials, Configuration.getInstance().getPingTargets()), 0, 5, TimeUnit.MINUTES);
View luaunbound-build.patch
diff -r d8e673854789 Makefile
--- a/Makefile Wed Apr 26 18:20:34 2017 +0200
+++ b/Makefile Fri Aug 11 16:32:48 2017 -0500
@@ -8,8 +8,8 @@
WGET?=curl -O
LUA_VERSION=5.1
-LUA_DIR=/usr/local
-LUA_LIBDIR=$(LUA_DIR)/lib/lua/$(LUA_VERSION)
+LUA_DIR=/usr/local/lua5.1
View Unifi-Letsencrypt-Updater.sh
#!/bin/bash
#########################################################
# A Small script to update the UniFi Keystore file from #
# an letsencrypt auto generated certificate. #
#########################################################
# The Domain of the UniFi Controller
DOMAIN='unifi.lan.therudes.com'
View prosody-build-script.sh
#!/bin/bash
VERSION="0.10"
# Update the System before we start
dpkg --get-selections |awk '{print $1}' |sed 's/:amd64//g' > /tmp/installed-packages.txt
UPDATE="" # Start out with UPDATE being NULL
for a in build-essential mercurial lua5.1 liblua5.1-0-dev libidn11-dev libssl-dev lua-event lua-sec lua-zlib lua-filesystem lua-expat lua-bitop lua-sql-sqlite3 lua-dbi-sqlite3 multitail
do
if [ `egrep "^$a$" /tmp/installed-packages.txt |wc -l` != "1" ]; then
View prosody-0.10.patch
diff -r 39188851811c configure
--- a/configure Tue Jun 13 20:13:09 2017 +0200
+++ b/configure Tue Jun 27 15:32:18 2017 -0500
@@ -4,7 +4,7 @@
APP_NAME="Prosody"
APP_DIRNAME="prosody"
-PREFIX="/usr/local"
+PREFIX="/"
SYSCONFDIR="$PREFIX/etc/$APP_DIRNAME"
View bind-update-script.sh
#!/bin/bash
BINDVER=`curl -slL ftp://ftp.isc.org/isc/bind9/cur/9.11/ |grep ".tar.gz$" |sed 's/bind-//g' |sed 's/.tar.gz//g'`
if [ -f /usr/local/sbin/named ]; then
CURRENTVER=`/usr/local/sbin/named -v |awk '{ print $2 }'`
elif [ -f /usr/sbin/named ]; then
CURRENTVER=`/usr/sbin/named -v |awk '{ print $2 }'`
else
CURRENTVER=0