Skip to content

Instantly share code, notes, and snippets.

View nabeken's full-sized avatar

Tanabe Ken-ichi nabeken

View GitHub Profile
#!/bin/bash
CONSUL_VERSION=${CONSUL_VERSION:-0.4.1}
source /etc/environment
name=$(cat /etc/machine-id)
if [ ! -f /opt/consul ]; then
[ -d /opt ] || mkdir /opt
mkdir /var/lib/consul
wget -q -O- https://dl.bintray.com/mitchellh/consul/${CONSUL_VERSION}_linux_amd64.zip | funzip - > /opt/consul
@nabeken
nabeken / docker-volume-cleanup.py
Last active August 29, 2015 14:05
cleanup vfs directory
#!/usr/bin/env python
import json
import os
import shutil
import subprocess
import re
dockerdir = '/var/lib/docker'
volumesdir = os.path.join(dockerdir, 'volumes')