Skip to content

Instantly share code, notes, and snippets.

@micw
micw / provision_wheezy_base.sh
Last active August 29, 2015 14:08
Script to provision a wheezy base box (e.g. a VPS) with ansible.
#!/bin/bash
#
# USAGE:
# [ -f /usr/bin/curl ] || apt-get -y install curl
# curl -sSL https://gist.githubusercontent.com/micw/987af53361c1d7de1369/raw/ | /bin/bash
set -e
if [ ! -f /etc/apt/sources.list.d/wheezy-backports.list ]; then
echo "Adding wheezy backport repository"
#!/bin/bash
# This script can be used as wrapper for rsync in authorized_keys. It restricts rsync the following way:
# - restrict target directory to be under /backups/backup-rsync-push/${1}/target/ where $1 is an argument from authorized_keys
# - restrict target directory to be exactly 1 level below this directory
# - restrict flags
# - restrict arguments
# - force --fake-super argument
err() {
@micw
micw / install_jenkins_plugin.sh
Last active January 29, 2026 13:49
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins