Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Must run on Proxmox VE 7 server
# Not sure how to handle a cluster - either run on each node or copy template after creating on one?
# e.g. $ ssh [email protected] < proxmox-create-cloud-template.sh
SRC_IMG="https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-disk-kvm.img"
@rgevaert
rgevaert / vault-unseal.sh
Created January 6, 2021 10:44
Simple wrapper script to unseal a vault server with encrypted seal keys
#!/bin/bash -e
# Simple wrapper script to unseal a vault server with encrypted seals
read -rp 'Decrypt method [keybase|gpg]: ' method
case "${method}" in
gpg)
cmd="gpg -dq"
;;
### Keybase proof
I hereby claim:
* I am rgevaert on github.
* I am rgevaert (https://keybase.io/rgevaert) on keybase.
* I have a public key ASDQfxSECsTK-sryvE31KHLAyl2vthXY7afdnZBdqBN9OQo
To claim this, I am signing this object:
VERSION v2.6.2
MYSELF 127.0.0.1 HOSTNAME
J_HOSTNAME SYSTEM
PRESENCE SHOW
FOOTER SHOW
FILTER_URL http://helpdesk.ugent.be/email/
POLICY_URL http://helpdesk.ugent.be/email/faq.php
DAEMON_FILTER_DISABLE
USER jchkmail
GROUP jchkmail
@rgevaert
rgevaert / apache_no_type.rb
Created January 19, 2016 13:38
logstash rspec rules
# -*- encoding : utf-8 -*-
# Checks the configuration of the apache.conf logstash file
require 'spec_helper'
require 'logstash/filters/grok'
describe "apache common log format" do
config <<-CONFIG
filter {
#!/bin/bash
version=$1
maintainer="Rudy Gevaert <[email protected]>"
description="Kibana is webinterface for Elasticsearch. To recreate this package use https://gist.github.com/rgevaert/5ea816c4ad0ef2979f32"
if [ "$version" == "" ]
then
echo Usage: $0 version-number
exit
# Put this in /etc/systemd/system/logstash.service.d/
# And then run systemctl daemon-reload
# Will make logstash start if it wasn't cleanly stopped.
# see https://github.com/elastic/logstash/issues/3606, https://github.com/systemd/systemd/issues/1211
[Service]
RemainAfterExit=false
grok {
tags => "postfix/smtpd"
pattern => [ "%{POSTFIXSMTPDCONNECTS}",
"%{POSTFIXSMTPDACTIONS}",
"%{POSTFIXSMTPDTIMEOUTS}",
"%{POSTFIXSMTPDLOGIN}",
"." ]
named_captures_only => true
}
@rgevaert
rgevaert / mcollective-wheezy.patch
Created May 3, 2013 15:11
Patch to make mcollective Debian packages that use ruby 1.9.1
diff --git a/ext/debian/control b/ext/debian/control
index 7fb71de..71c07c9 100644
--- a/ext/debian/control
+++ b/ext/debian/control
@@ -8,14 +8,14 @@ Homepage: http://marionette-collective.org/
Package: mcollective
Architecture: all
-Depends: ruby (>= 1.8.1), mcollective-common (= ${source:Version})
+Depends: ruby (>= 1.9.1), mcollective-common (= ${source:Version})