I hereby claim:
- I am zinox on github.
- I am zinox (https://keybase.io/zinox) on keybase.
- I have a public key ASA4WcnvDA6CdMu2LxquSlmmUpG4DaYsm5RAH8vUVlUdggo
To claim this, I am signing this object:
#!/bin/sh | |
set +x | |
SUBJECT="Disk Usage Report on $(date)" | |
MESSAGE="/tmp/disk-usage.out" | |
TO="user1@example.com,user2@example.com" | |
threshold=95 | |
> $MESSAGE | |
for server in $(cat /root/bin/servers.txt) |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# This is a general-purpose function to ask Yes/No questions in Bash, either | |
# with or without a default answer. It keeps repeating the question until it | |
# gets a valid answer. | |
ask() { | |
# https://gist.github.com/davejamesmiller/1965569 | |
local prompt default reply | |
if [ "${2:-}" = "Y" ]; then | |
prompt="Y/n" |
# create files in an otherwise empty directory | |
mkdir files | |
cd files | |
touch setup.sh # entry point after extraction | |
touch file.txt # supporting data used by setup.sh | |
# create archive | |
tar -pczf ../archive.tar.gz * | |
cd .. |
#!/bin/bash | |
set -e | |
## striping seems to break docker | |
#STRIPE="-i2 -I64" | |
#DEVS="/dev/xvdf /dev/xvdg" | |
DEVS="$1" | |
if [ -z "$DEVS" ]; then | |
echo >&2 "Specify which block devices to use" | |
exit 1 |
#!/usr/bin/expect -f | |
set host "host" | |
set password "password" | |
spawn ssh $host | |
expect { | |
"(yes/no)?" { | |
send -- "yes\r" |