This file contains 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
<?php | |
// pfSense PHP script to generate a range of DNS forwarder hosts based on | |
// "dot${lastoctet}", eg. 192.0.2.100 == dot100.example.com | |
// Open terminal, run "php" copy/paste script with the following defines tweaked | |
// Ctrl-D, wait a moment until you see "Content-type: text/html" | |
// Open the DNS config in the web UI and click Apply Changes | |
define('DOT_DOMAIN', 'example.com'); | |
define('DOT_SUBNET', '192.0.2.'); // Leave off the final octet, include the dot | |
define('DOT_RANGE_START', 100); |
This file contains 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/sh | |
# Script for Debian, which lags majorly behind on Monit releases. | |
# This will download the given version and overwrite Debian's binary and man-page, | |
# install a symlink to monitrc (Debian's package expects it in /etc/monit/monitrc, | |
# while the distributed binary expects /etc/monitrc), and installs the distributed | |
# example configuration at /etc/monit/monitrc.pkgdist | |
# | |
# Bryce Chidester <bryce@cobryce.com> | |
# Run as root |
This file contains 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 | |
# Quick script to build a USB bootable stick | |
# Requires syslinux, sfdisk, dosfstools, and looptools | |
# ex: script2.sh /dev/sdd /path/to/overlay | |
USBDEVICE=$1 | |
if [ ! $1 ] | |
then | |
echo You must specify the full path to the USB device, e.g. /dev/sdd | |
exit 1 |
This file contains 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/sh | |
GPVER=$1 | |
if [ -z ${GPVER} ]; then | |
# Match the download link to the LiveCD download on the project homepage. | |
GPVER=$(curl -qs http://gparted.sourceforge.net/ | sed -n -r -e 's/.*iso">Live (.*)<\/a>/\1/p') | |
echo "Fetched GParted version: ${GPVER}" | |
else | |
echo "Using GParted version: ${GPVER}" | |
fi |
This file contains 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/sh | |
for CZBRANCH in stable alternative; do | |
# Try to use whatever version was given on the command line on both stable and alternative branches | |
echo "Processing branch ${CZBRANCH}..." | |
CZVER=$1 | |
if [ -z ${CZVER} ]; then | |
# Match the <input> field on the download selector form | |
CZVER=$(curl -qs http://clonezilla.org/downloads/download.php?branch=${CZBRANCH} | sed -n -r -e 's/.*<input.*name=.version.*value=.(.*).>/\1/p') | |
echo "Fetched Clonezilla ${CZBRANCH} version ${CZVER}" |
This file contains 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/sh | |
# This is a little scriptlet I wrote to take the files I'd copied from a CD under | |
# Windows, which inexplicably did not honour the RockRidge or Joliet extensions, | |
# and rename them back to their correct names, and recreate symbolic links. | |
# Adjust as necessary (eg: some BSDs don't support -v on mv and ln) | |
# | |
# Bryce Chidester <bryce@cobryce.com> | |
# | |
for DIR in $(find . -type d); do | |
(cd "$DIR" && |
This file contains 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 | |
MIRROR=mirrors.us.kernel.org | |
ROOTDIR=/home/image/boot | |
for REL in vivid utopic trusty saucy precise lucid #raring quantal oneiric natty maverick | |
do | |
for ARCH in i386 amd64 | |
do | |
echo "Sync'ing Ubuntu $REL / $ARCH..." | |
mkdir -p $ROOTDIR/Ubuntu/$REL/$ARCH/ |
This file contains 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 | |
MIRROR=mirrors.us.kernel.org | |
ROOTDIR=/home/image/boot/ | |
#wget -N http://$MIRROR/centos/5/os/i386/images/pxeboot/initrd.img http://$MIRROR/centos/5/os/i386/images/pxeboot/vmlinuz | |
#wget -N http://$MIRROR/centos/5/os/x86_64/images/pxeboot/initrd.img http://$MIRROR/centos/5/os/x86_64/images/pxeboot/vmlinuz | |
#wget -N http://$MIRROR/centos/6/os/i386/images/pxeboot/initrd.img http://$MIRROR/centos/6/os/i386/images/pxeboot/vmlinuz | |
#wget -N http://$MIRROR/centos/6/os/x86_64/images/pxeboot/initrd.img http://$MIRROR/centos/6/os/x86_64/images/pxeboot/vmlinuz | |
# Starting with RHEL 7, there are only x86_64 releases (no i386) |
This file contains 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 | |
FILE=${1:-ERROR} | |
MOUNTPATH=${2:-/mnt/image/} | |
OWD=$PWD | |
if [ "x$FILE" = "xERROR" ] | |
then | |
echo "No file specified" | |
exit 1 | |
fi |
This file contains 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 | |
MIRROR=mirrors.us.kernel.org | |
ROOTDIR=/home/image/boot/ | |
# http://$MIRROR/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz | |
# http://$MIRROR/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/linux | |
# $ROOTDIR/Debian/squeeze/i386/ | |
for REL in jessie wheezy #squeeze lenny etch sarge | |
do | |
for ARCH in i386 amd64 |