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
# zonecfg -z <uuid> | |
zonecfg:uuid> add attr | |
zonecfg:uuid:attr> set name=resolvers | |
zonecfg:uuid:attr> set type=string | |
zonecfg:uuid:attr> set value=8.8.8.8,8.8.4.4 | |
zonecfg:uuid:attr> end | |
zonecfg:uuid> verify | |
zonecfg:uuid> commit | |
zonecfg:uuid> exit | |
# vmadm reboot <uuid> |
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
#! /usr/local/bin/bash | |
# | |
# Calomel.org | |
# https://calomel.org/zfs_health_check_script.html | |
# FreeBSD 9.1 ZFS Health Check script | |
# zfs_health.sh @ Version 0.15 | |
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD | |
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS | |
# pools. For now, in FreeBSD 9, we will make our own checks and run this script |
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
smarthost=mail.sample.com | |
user=me | |
[email protected] | |
/opt/csw/bin/gsed -i "s/^DS[\s]*.*/DS $smarthost/g" /etc/mail/submit.cf | |
/opt/csw/bin/gsed -i "s/^DS[\s]*.*/DS $smarthost/g" /etc/mail/sendmail.cf | |
/opt/csw/bin/gsed -i "/$user:/d" /etc/mail/aliases | |
echo "$user:$alertlist" >> /etc/mail/aliases | |
/opt/csw/bin/gsed -i "/root:/d" /etc/mail/aliases | |
echo "root:$alertlist" >> /etc/mail/aliases | |
newaliases |
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 | |
set -e | |
if [ "$1" = "-d" ] || [ "$1" = "--debug" ]; then | |
DEBUG=1 | |
fi | |
[ "$DEBUG" = "1" ] && set -x | |
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
#!/usr/bin/bash | |
# | |
# Script should be run in GZ. | |
# | |
# example: | |
# ./add-flow-to-vm.sh c480b89f-f8a1-41b1-abd0-45bac4685cb2 15M | |
# | |
# It will add TCP/UDP flows for this particular VM, and limits bandwidth to 15Mbps | |
# |