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
### exit the script if any statement returns a non-true return value. | |
set -o errexit |
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
### exit the script if there are any uninitialised variable. | |
set -o nounset |
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/sbin/qmasterprefs -list |
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 | |
## from http://groups.google.com/group/macenterprise/browse_thread/thread/25647cbd9e346d16 | |
# remove exiting printers | |
curPrinterList=`lpstat -p | grep printer | awk '{ print $2 }'` | |
for p in $curPrinterList; do | |
echo "Removing $p..." | |
if lpadmin -x $p; then | |
echo "Done" | |
else | |
echo "\n*******Error removing $p********\n$result\n\n" |
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
# Stop the CUPS daemon with the following command. | |
launchctl stop org.cups.cupsd | |
wait | |
# Rename the old CUPS configuration file. | |
mv /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup | |
wait | |
# Restore the default settings file. | |
cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf | |
wait | |
# Rename printers file. |
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
# print test page | |
prName="$1"; | |
lp /usr/share/cups/data/testprint.ps |
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
lpstat -p | awk '{print $2}' |
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
# Set Printer as Default | |
prName="HP_LaserJet_4015" | |
lpoptions -d "${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/bash | |
# | |
# A mysql replication plugin for the check_mk nagios system. | |
# Place me in /usr/lib/check_mk_agent/local on the client | |
# | |
# Hereward Cooper <coops@iomart.com> - 16/06/11 | |
MYSQL_USER="root" | |
MYSQL_PASS="PAassw0rd" |
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/env bash | |
set -o errtrace | |
set -o errexit | |
facter_version=$1 | |
puppet_version=$2 | |
target_volume=$3 |
OlderNewer