#!/bin/bash -xe server=$1 type=$2 if [ -z "$type" ]; then echo "USAGE: $0 server type" exit 1 fi if ! [ -e ~/humbug/humbug.pem ]; then echo "You need humbug.pem at ~/humbug/humbug.pem; ask tabbott for it" exit 1 fi if ! [ -e ~/humbug/servers/puppet/files/id_rsa ]; then echo "You need a server ssh key at ~/humbug/servers/puppet/files/id_rsa" exit 1 fi ssh "$server" -t -i ~/humbug/humbug.pem -lroot <>/etc/apt/sources.list.d/backports.list < /root/.ssh/known_hosts <