This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on this blog post: https://clinta.github.io/FreeNAS-Multipurpose-SSD/ | |
set -xe | |
ssd1=ada2 | |
ssd2=ada3 | |
pool=tank | |
gpart create -s gpt $ssd1 | |
gpart create -s gpt $ssd2 | |
gpart add -a 4k -b 128 -t freebsd-zfs -s 30G $ssd1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if salt['pkg.version']('apache2') %} | |
poodle apache server restart: | |
service.running: | |
- name: apache2 | |
{% for foundfile in salt['cmd.run']('rgrep -m 1 SSLProtocol /etc/apache*').split('\n') %} | |
{% if 'No such file' not in foundfile and 'bak' not in foundfile and foundfile.strip() != ''%} | |
poodle {{ foundfile.split(':')[0] }}: | |
file.replace: | |
- name : {{ foundfile.split(':')[0] }} | |
- pattern: "SSLProtocol all -SSLv2[ ]*$" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import salt.client | |
import argparse | |
import sys | |
parser = argparse.ArgumentParser(description='Check if minions are online.') | |
parser.add_argument('hostname', help='The name of the minion to be checked') | |
args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var haproxyLog = new HaProxyLog({ | |
port: process.env.PORT||3333 | |
}); | |
haproxyLog | |
.on( "up", console.log.bind( console, "Server is up" ) ) | |
.on( "down", console.log.bind( console, "Server is down" ) ) | |
.on( "backend-down", console.log.bind( console, "Backend is down" ) ) | |
.on( "access-log", console.log.bind( console, "access log entry:" ) ) | |
.on( "raw", function( message ){console.log( "this is the raw message:", message.toString() ) }); |