Skip to content

Instantly share code, notes, and snippets.

View christophlehmann's full-sized avatar

Christoph Lehmann christophlehmann

View GitHub Profile
@christophlehmann
christophlehmann / typo3-news-sitemap.ts
Last active December 8, 2016 19:46
TYPO3 TypoScript sitemap for news extension
# Sitemap for news
[globalVar = TSFE:type = 1481221329]
config {
disableAllHeaderCode = 1
admPanel = 0
metaCharset = utf-8
additionalHeaders = Content-Type:text/xml;charset=utf-8
disablePrefixComment = 1
}
@christophlehmann
christophlehmann / check_certificates.sh
Created September 15, 2016 10:02
Check expiry of SSL certificates used in apache with nagios check_http
#!/bin/bash
SSL_CERTIFICATE_WARN_DAYS=7
source /etc/(apache2|httpd)/envvars
for i in `apache2 -S 2>/dev/null | grep "port 443" | awk '{print $4}' | sort | uniq`
do
/usr/lib/nagios/plugins/check_http -H $i -C $SSL_CERTIFICATE_WARN_DAYS | xargs echo "$i" | grep -v 'OK -'
done